78% great-index

Code Review | Great Index

WordPress plugin Great Index scored78%from 54 tests.

About plugin

  • Plugin page: great-index
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2014
  • Latest release: Jun 25, 2014
  • Number of updates: 19
  • Update frequency: every 7.3 days
  • Top authors: roycegracie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,360 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.67MB] [CPU: ▼15.01ms] Passed 4 tests

An overview of server-side resources used by Great Index
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.53 ▼0.21
Dashboard /wp-admin3.34 ▲0.0352.76 ▲3.33
Posts /wp-admin/edit.php3.39 ▲0.0348.71 ▼5.44
Add New Post /wp-admin/post-new.php3.12 ▼2.7736.78 ▼57.72
Media Library /wp-admin/upload.php3.26 ▲0.0337.78 ▲3.54
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_categories&post_type=portfolio3.2533.39
Index /wp-admin/edit.php?post_type=portfolio3.3035.69
Add New /wp-admin/post-new.php?post_type=portfolio3.1233.26

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

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

Browser metrics Passed 4 tests

Great Index: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.77 ▼0.611.79 ▼0.2143.37 ▼0.03
Dashboard /wp-admin2,237 ▲525.90 ▼0.0298.53 ▼5.2239.34 ▼7.99
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0236.02 ▼3.4334.63 ▼0.23
Add New Post /wp-admin/post-new.php1,565 ▲4623.11 ▼0.26671.92 ▼4.8456.59 ▲2.43
Media Library /wp-admin/upload.php1,419 ▲314.18 ▼0.0297.40 ▼11.1444.59 ▼1.70
Categories /wp-admin/edit-tags.php?taxonomy=portfolio_categories&post_type=portfolio1,2962.1425.7228.91
Index /wp-admin/edit.php?post_type=portfolio1,1011.9332.0831.10
Add New /wp-admin/post-new.php?post_type=portfolio2,3537.63171.2760.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+203
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+180
    Undefined index: title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+181
    Undefined index: Location
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+182
    Undefined index: Phone
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+183
    Undefined index: Email
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+184
    Undefined index: Website
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Notice in wp-content/plugins/great-index/great-index.php+184
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/great-index/great-index.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === great-index === )
You can look at the official readme.txt

great-index/great-index.php 92% from 13 tests

The primary PHP file in "Great Index" version 0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

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 detected308 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1033172
CSS2214113
JavaScript181123

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/phone.png3.23KB0.71KB▼ 78.17%
images/email.png3.49KB1.13KB▼ 67.57%
(invalid) images/default-img.png7.38KB0.00KB▼ 100.00%
images/website.png3.32KB0.85KB▼ 74.52%
images/location.png3.10KB0.61KB▼ 80.20%