83% readinglist

Code Review | Readinglist

WordPress plugin Readinglist scored83%from 54 tests.

About plugin

  • Plugin page: readinglist
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2018
  • Latest release: Nov 27, 2022
  • Number of updates: 13
  • Update frequency: every 119.7 days
  • Top authors: SdeWijs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.14MB] [CPU: ▼11.74ms] Passed 4 tests

Analyzing server-side resources used by Readinglist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0933.99 ▼2.02
Dashboard /wp-admin3.57 ▲0.2753.97 ▲10.91
Posts /wp-admin/edit.php3.62 ▲0.2748.17 ▲5.14
Add New Post /wp-admin/post-new.php4.78 ▼1.1145.31 ▼51.98
Media Library /wp-admin/upload.php3.41 ▲0.1833.69 ▲1.89
Readinglist /wp-admin/options-general.php?page=readinglist_settings3.4135.46

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
readinglist_settings
widget_theysaidso_widget

Browser metrics Passed 4 tests

Readinglist: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,095 ▲34915.39 ▲0.806.53 ▲4.8951.08 ▲10.90
Dashboard /wp-admin2,367 ▲1756.61 ▲1.69121.50 ▲11.1635.47 ▼8.27
Posts /wp-admin/edit.php2,267 ▲1783.51 ▲1.4749.25 ▲15.4031.82 ▼2.67
Add New Post /wp-admin/post-new.php1,687 ▲17322.72 ▲5.02609.99 ▼80.4829.39 ▼45.57
Media Library /wp-admin/upload.php1,412 ▲274.35 ▲0.1281.86 ▼16.5643.29 ▼3.62
Readinglist /wp-admin/options-general.php?page=readinglist_settings1,1013.4449.4428.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • readinglist_settings
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/readinglist/gh-reading-list.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/readinglist/vendor/tareq1988/wordpress-settings-api-class/example/procedural-example.php:270
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/readinglist/inc/gh-readinglist-settings.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/readinglist/vendor/tareq1988/wordpress-settings-api-class/src/class.settings-api.php:32

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #3 in readinglist/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === readinglist === )
You can take inspiration from this readme.txt

readinglist/gh-reading-list.php 92% from 13 tests

Analyzing the main PHP file in "Readinglist" version 2.1
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("readinglist.php" instead of "gh-reading-list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,160 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP132614371,503
PO File286254245
JavaScript1124153
CSS1192116
JSON30084
Markdown121047
SVG10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.60
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods59
▷ Static methods46.78%
▷ Public methods5898.31%
▷ Protected methods00.00%
▷ Private methods11.69%
Functions22
▷ Named functions2090.91%
▷ Anonymous functions29.09%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.39MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/cancel.png12.62KB10.30KB▼ 18.37%
vendor/tareq1988/wordpress-settings-api-class/screenshot-1.png389.59KB115.93KB▼ 70.24%