79% go-sphinx

Code Review | Gigaom Sphinx

WordPress plugin Gigaom Sphinx scored79%from 54 tests.

About plugin

  • Plugin page: go-sphinx
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Nov 4, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: misterbisson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼10.55ms] Passed 4 tests

This is a short check of server-side resources used by Gigaom Sphinx
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.98 ▼0.4816.52 ▼31.14
Dashboard /wp-admin3.69 ▲0.3855.47 ▲0.57
Posts /wp-admin/edit.php3.75 ▲0.4048.84 ▼2.33
Add New Post /wp-admin/post-new.php6.22 ▲0.3393.67 ▼6.37
Media Library /wp-admin/upload.php3.69 ▲0.4639.23 ▼2.37
Sphinx /wp-admin/options-general.php?page=go-sphinx3.6933.51

Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gigaom Sphinx
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,468 ▼29314.30 ▼0.030.63 ▼1.3618.92 ▼28.77
Dashboard /wp-admin2,202 ▲325.62 ▲0.0093.78 ▼18.6943.22 ▲0.58
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0136.98 ▲1.9532.78 ▼7.01
Add New Post /wp-admin/post-new.php1,529 ▲122.52 ▼0.31660.67 ▼2.2672.52 ▲7.79
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.11102.06 ▼5.1647.67 ▲0.96
Sphinx /wp-admin/options-general.php?page=go-sphinx7591.9924.7526.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/go-sphinx/components/templates/config-file.php
  • 56× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 55
    • > PHP Notice
      Trying to get property 'user' of non-object in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 8
    • > PHP Notice
      Trying to get property 'posts_table' of non-object in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 112
    • > PHP Notice
      Trying to get property 'user' of non-object in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 71
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 34
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 57
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 79
    • > PHP Notice
      Undefined variable: c in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 8
    • > PHP Notice
      Trying to get property 'posts_table' of non-object in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 48
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/go-sphinx/components/templates/config-file.php on line 55

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: performance, keyword search, wpquery, taxonomy queries, fulltext...

go-sphinx/go-sphinx.php Passed 13 tests

The main file in "Gigaom Sphinx" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
42 characters long description:
Improve WP Query performance using Sphinx.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,713 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP86847783,677
JavaScript17336

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity120.50
▷ Minimum class complexity4.00
▷ Maximum class complexity184.00
Average method complexity4.73
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods128
▷ Static methods00.00%
▷ Public methods128100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants59
▷ Global constants59100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin