78% also-in-this-series

Code Review | Also In This Series

WordPress plugin Also In This Series scored 78% from 54 tests.

About plugin

  • Plugin page: also-in-this-series
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.0
  • WordPress version: 6.3.1
  • First release: Jul 8, 2013
  • Latest release: Jan 29, 2022
  • Number of updates: 23
  • Update frequency: every 136.0 days
  • Top authors: jweathe (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active / 3,190 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Also In This Series
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.35 ▼9.02
Dashboard /wp-admin3.47 ▲0.1748.15 ▲1.08
Posts /wp-admin/edit.php3.59 ▲0.2351.44 ▲4.53
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.68 ▼46.82
Media Library /wp-admin/upload.php3.40 ▲0.1634.53 ▲1.47
Also In This Series /wp-admin/options-general.php?page=also-in-this-series-settings3.3634.55
Series /wp-admin/edit-tags.php?taxonomy=series3.3935.16

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_alsointhisseries_widget
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Also In This Series
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.21 ▼0.971.65 ▼0.2044.23 ▼3.27
Dashboard /wp-admin2,211 ▲235.83 ▼0.02103.10 ▼15.3539.48 ▼4.68
Posts /wp-admin/edit.php2,142 ▲532.00 ▼0.0540.73 ▲5.0735.52 ▲1.51
Add New Post /wp-admin/post-new.php1,548 ▲1118.63 ▲0.45628.25 ▲17.3457.28 ▲1.63
Media Library /wp-admin/upload.php1,399 ▲204.25 ▲0.1099.51 ▼3.6140.63 ▼1.18
Also In This Series /wp-admin/options-general.php?page=also-in-this-series-settings9322.0725.8031.33
Series /wp-admin/edit-tags.php?taxonomy=series1,2392.1327.2330.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • alsointhisseries_deactivate
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_alsointhisseries_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/also-in-this-series/views/serieslisting.php
    • > /wp-content/plugins/also-in-this-series/views/admin/optionsfield-textfield.php
    • > /wp-content/plugins/also-in-this-series/views/widget-view.php
    • > /wp-content/plugins/also-in-this-series/views/admin/optionsfield-select.php
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function planetjon\\wordpress\\also_in_this_series\\add_action() in wp-content/plugins/also-in-this-series/plugin-admin.php:185
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/also-in-this-series/views/serieslisting.php on line 13
    • > PHP Notice
      Trying to get property 'slug' of non-object in wp-content/plugins/also-in-this-series/views/serieslisting.php on line 1
    • > PHP Notice
      Undefined variable: widget in wp-content/plugins/also-in-this-series/views/widget-view.php on line 2
    • > PHP Notice
      Undefined variable: series in wp-content/plugins/also-in-this-series/views/serieslisting.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/also-in-this-series/views/admin/optionsfield-select.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/also-in-this-series/views/admin/optionsfield-radiobutton.php on line 1
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/also-in-this-series/views/serieslisting.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/also-in-this-series/views/widget-view.php on line 2
    • > PHP Notice
      Undefined variable: values in wp-content/plugins/also-in-this-series/views/admin/optionsfield-checkbox.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: posts, widget, series, seo, related posts...

also-in-this-series/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Also In This Series" version 2.0.1
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("also-in-this-series.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected631 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1412028631

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity16.00
▷ Minimum class complexity9.00
▷ Maximum class complexity23.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1376.47%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There were not PNG files found in your plugin