84% series

Code Review | Series

WordPress plugin Series scored84%from 54 tests.

About plugin

  • Plugin page: series
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.0.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2009
  • Latest release: Dec 17, 2018
  • Number of updates: 9
  • Update frequency: every 390.3 days
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

3,000+ active /42,744 total downloads

Benchmarks

Plugin footprint 83% 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.05MB] [CPU: ▼4.55ms] Passed 4 tests

A check of server-side resources used by Series
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.91 ▲3.70
Dashboard /wp-admin3.35 ▲0.0548.30 ▼1.54
Posts /wp-admin/edit.php3.41 ▲0.0543.62 ▼6.44
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.80 ▼10.64
Media Library /wp-admin/upload.php3.28 ▲0.0533.15 ▲0.42
Series /wp-admin/options-general.php?page=series-settings3.2432.50
Series /wp-admin/edit-tags.php?taxonomy=series3.2734.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_series-list-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_series-list-related
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Series
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.51 ▼0.924.51 ▲2.7143.57 ▲3.34
Dashboard /wp-admin2,214 ▲235.91 ▲1.03104.76 ▼3.2836.92 ▼6.92
Posts /wp-admin/edit.php2,139 ▲501.99 ▼0.0234.47 ▼5.1232.12 ▼2.22
Add New Post /wp-admin/post-new.php1,542 ▲2323.57 ▲0.40592.89 ▼12.8447.97 ▲0.44
Media Library /wp-admin/upload.php1,390 ▼14.15 ▼0.0797.74 ▼4.7239.75 ▼6.98
Series /wp-admin/options-general.php?page=series-settings9212.0522.7732.98
Series /wp-admin/edit-tags.php?taxonomy=series1,2422.1327.3929.02

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 were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_series-list-related
    • widget_recent-comments
    • widget_series-list-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Series\\trailingslashit() in wp-content/plugins/series/series.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Series\\add_action() in wp-content/plugins/series/inc/functions-taxonomies.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Series\\add_action() in wp-content/plugins/series/inc/functions-filters.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/series/inc/widgets/class-list-posts.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Series\\add_action() in wp-content/plugins/series/inc/functions-shortcodes.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/series/inc/widgets/class-list-related.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Series\\add_action() in wp-content/plugins/series/admin/class-settings.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Series meta box on the edit post screen.), #2 (Widgets on the widgets admin screen.), #3 (Manage series admin screen.), #4 (Example widget output in theme.)
The official readme.txt is a good inspiration

series/series.php Passed 13 tests

"Series" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
52 characters long description:
Plugin that allows you to collect posts in a series.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin969 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11270663640
Markdown4970329

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes240.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png4.88KB4.65KB▼ 4.66%
screenshot-1.png18.41KB9.94KB▼ 46.02%
screenshot-2.png11.94KB6.12KB▼ 48.79%
screenshot-3.png20.80KB20.76KB0.20%