68% wp-list-gists

Code Review | WP List Gists

WordPress plugin WP List Gists scored68%from 54 tests.

About plugin

  • Plugin page: wp-list-gists
  • Plugin version: ...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2013
  • Latest release: Apr 28, 2015
  • Number of updates: 17
  • Update frequency: every 33.1 days
  • Top authors: sdellow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /767 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼37.45ms] Passed 4 tests

An overview of server-side resources used by WP List Gists
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.14 ▼0.3319.47 ▼23.87
Dashboard /wp-admin3.19 ▼0.1518.82 ▼42.54
Posts /wp-admin/edit.php3.19 ▼0.1621.75 ▼20.53
Add New Post /wp-admin/post-new.php3.19 ▼2.6920.57 ▼62.84
Media Library /wp-admin/upload.php3.19 ▼0.0419.88 ▼12.14

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 220 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP List Gists: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1514.67 ▲0.421.87 ▼0.0542.56 ▼0.55
Dashboard /wp-admin2,217 ▲435.61 ▲0.0793.26 ▼12.3639.21 ▼4.23
Posts /wp-admin/edit.php2,122 ▲222.02 ▼0.0139.58 ▼1.7933.16 ▼1.68
Add New Post /wp-admin/post-new.php1,574 ▲3021.34 ▼3.77666.46 ▲69.7938.87 ▼32.81
Media Library /wp-admin/upload.php1,416 ▲134.23 ▼0.0798.85 ▼2.0339.55 ▼6.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-list-gists/functions/misc.php+83
    Trying to access array offset on value of type resource
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 12× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-list-gists/autoloader.php
    • > /wp-content/plugins/wp-list-gists/models/model.php
    • > /wp-content/plugins/wp-list-gists/views/dashboard.php
    • > /wp-content/plugins/wp-list-gists/functions/cmb2.php
    • > /wp-content/plugins/wp-list-gists/functions/misc.php
    • > /wp-content/plugins/wp-list-gists/controllers/request.php
    • > /wp-content/plugins/wp-list-gists/controllers/dashboard.php
    • > /wp-content/plugins/wp-list-gists/config.php
    • > /wp-content/plugins/wp-list-gists/functions/shortcode.php
    • > /wp-content/plugins/wp-list-gists/templates/admin/plugin_options.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-list-gists/vendors/cmb2/init.php:85
    • > PHP Notice
      Undefined variable: test_root in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/cmb-tests-base.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-list-gists/includes/cmb/init.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/cmb-tests-base.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/cmb-tests-base.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/cmb-tests-base.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-list-gists/vendors/cmb2/example-functions.php:53
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/bootstrap.php on line 24
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-list-gists/vendors/cmb2/tests/bootstrap.php on line 24

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (WP List Gists setting screen.), #2 (Meta Box for dynamically selecting a Gist.)
You can look at the official readme.txt

wp-list-gists/wp-list-gists.class.php 85% from 13 tests

The entry point to "WP List Gists" version ... is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of " ...")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-list-gists.php" instead of "wp-list-gists.class.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin77,997 lines of code in 165 files:
LanguageFilesBlank linesComment linesLines of code
XML20047,741
PO File948,83611,75220,210
PHP351,3142,3554,914
CSS68594822,487
JavaScript92182691,031
Sass1016223997
Markdown41190343
YAML280136
JSON20078
Bourne Shell114560

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity24.89
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes00.00%
Methods309
▷ Static methods165.18%
▷ Public methods29896.44%
▷ Protected methods30.97%
▷ Private methods82.59%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 compressed PNG files occupy 0.14MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendors/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
vendors/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/cmb/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendors/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendors/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%