84% retroposts

Code Review | Historian

WordPress plugin Historian scored 84% from 54 tests.

About plugin

  • Plugin page: retroposts
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 10, 2013
  • Latest release: Sep 25, 2023
  • Number of updates: 17
  • Update frequency: every 215.7 days
  • Top authors: ohryan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.26ms] Passed 4 tests

An overview of server-side resources used by Historian
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.43 ▼3.96
Dashboard /wp-admin3.32 ▲0.0243.96 ▼6.70
Posts /wp-admin/edit.php3.37 ▲0.0251.74 ▲6.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.70 ▼8.51
Media Library /wp-admin/upload.php3.25 ▲0.0236.90 ▲2.15

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
widget_historian_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Historian
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7913.26 ▼1.114.32 ▲2.1840.63 ▼4.69
Dashboard /wp-admin2,239 ▲514.85 ▼0.06109.70 ▼9.8439.30 ▼6.20
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0141.09 ▲5.9434.07 ▲0.31
Add New Post /wp-admin/post-new.php6,587 ▲5,07329.17 ▲11.50900.23 ▲264.1764.18 ▲12.06
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0296.96 ▲1.0342.55 ▲0.04

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_historian_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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 items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/retroposts/classes/HistorianWidget-class.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/retroposts/classes/HistorianWidget-class.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: post history, block, dashboard widget

retroposts/historian.php 85% from 13 tests

This is the main PHP file of "Historian" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("retroposts.php" instead of "historian.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin31,699 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JSON40031,496
PHP43427107
JavaScript5184675
Sass22019
CSS2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.18KB19.25KB▼ 66.34%