78% simple-post-series

Code Review | Simple Post Series

WordPress plugin Simple Post Series scored78%from 54 tests.

About plugin

  • Plugin page: simple-post-series
  • Plugin version: 2.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.0
  • WordPress version: 6.3.1
  • First release: Dec 1, 2012
  • Latest release: Apr 21, 2019
  • Number of updates: 39
  • Update frequency: every 60.4 days
  • Top authors: chaozh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼1.09ms] Passed 4 tests

An overview of server-side resources used by Simple Post Series
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1648.75 ▲6.66
Dashboard /wp-admin3.60 ▲0.3046.28 ▲3.77
Posts /wp-admin/edit.php3.72 ▲0.3746.81 ▼2.10
Add New Post /wp-admin/post-new.php6.23 ▲0.3587.45 ▼11.88
Media Library /wp-admin/upload.php3.53 ▲0.3037.72 ▲5.87
Series /wp-admin/edit-tags.php?taxonomy=series3.5235.46
Series Bulk Edit /wp-admin/edit.php?page=series_bulk_edit_post3.4733.27
Series Bulk Edit /wp-admin/edit.php?post_type=page&page=series_bulk_edit_page3.4734.51
Post Series /wp-admin/options-general.php?page=series_settings3.4731.14
Series /wp-admin/edit-tags.php?taxonomy=series&post_type=page3.5234.92

Server storage [IO: ▲0.16MB] [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: 30 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_widget_series
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
widget_widget_list_series
series_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Post Series
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.75 ▼0.625.70 ▲3.7938.07 ▼6.67
Dashboard /wp-admin2,233 ▲424.87 ▼1.0297.12 ▼4.0039.88 ▼3.22
Posts /wp-admin/edit.php2,146 ▲542.06 ▲0.0236.36 ▼5.5433.22 ▼2.23
Add New Post /wp-admin/post-new.php1,733 ▲21123.08 ▼0.19636.36 ▲50.8338.84 ▼16.27
Media Library /wp-admin/upload.php1,415 ▲274.24 ▼0.0395.25 ▲2.9040.95 ▼3.18
Series /wp-admin/edit-tags.php?taxonomy=series1,2892.1529.3630.08
Series Bulk Edit /wp-admin/edit.php?page=series_bulk_edit_post1,1142.2839.4729.06
Series Bulk Edit /wp-admin/edit.php?post_type=page&page=series_bulk_edit_page1,1012.3136.9128.16
Post Series /wp-admin/options-general.php?page=series_settings9771.7224.2831.09
Series /wp-admin/edit-tags.php?taxonomy=series&post_type=page1,2832.1527.1831.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • widget_widget_series
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_widget_list_series
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=series_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=series_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=series_settings
    • > Notice in wp-content/plugins/simple-post-series/series-admin.php+435
    Undefined index: auto_hide

SRP 50% 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 fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-post-series/series.php:35
    • > PHP Warning
      require_once(SERIES_ROOT/series-edition.php): failed to open stream: No such file or directory in wp-content/plugins/simple-post-series/series-admin.php on line 2
    • > PHP Warning
      Use of undefined constant SERIES_ROOT - assumed 'SERIES_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-post-series/series-admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-post-series/template/taxonomy-series.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'SERIES_ROOT/series-edition.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-post-series/series-admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-post-series/inc/tinymce-plugin-dialog.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-post-series/series-edition.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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 your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === simple-post-series === )
You can take inspiration from this readme.txt

simple-post-series/series.php 85% from 13 tests

The main PHP script in "Simple Post Series" version 2.4.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-post-series.php" instead of "series.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 206 characters long)

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 detected2,096 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP62382721,322
CSS56667555
JavaScript62230207
SVG10012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.00
▷ Minimum class complexity9.00
▷ Maximum class complexity15.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
inc/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
inc/images/icon.png0.47KB0.54KB0.00%
inc/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
inc/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%