77% worth-the-read

Code Review | Worth The Read

WordPress plugin Worth The Read scored77%from 54 tests.

About plugin

  • Plugin page: worth-the-read
  • Plugin version: 1.14.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: Aug 4, 2023
  • Number of updates: 81
  • Update frequency: every 31.6 days
  • Top authors: brianmcculloh (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

5,000+ active /96,194 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.98MB] [CPU: ▲29.48ms] 75% from 4 tests

This is a short check of server-side resources used by Worth The Read
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 15.34MB on /wp-admin/admin.php?page=wtr_options&tab=1)
PageMemory (MB)CPU Time (ms)
Home /14.54 ▲11.0895.26 ▲54.65
Dashboard /wp-admin6.30 ▲3.0074.03 ▲24.95
Posts /wp-admin/edit.php6.35 ▲3.0080.05 ▲33.71
Add New Post /wp-admin/post-new.php8.85 ▲2.96122.61 ▲27.20
Media Library /wp-admin/upload.php6.18 ▲2.9667.25 ▲32.06
Time Commitment /wp-admin/admin.php?page=wtr_options&tab=415.60161.81
Redux /wp-admin/options-general.php?page=redux-framework6.1957.16
Import / Export /wp-admin/admin.php?page=wtr_options&tab=715.3480.14
Reading Progress /wp-admin/admin.php?page=wtr_options&tab=115.3485.93

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 830 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
wtr_settings
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
wtr_debug_messages
wtr_settings-transients
db_upgraded

Browser metrics Passed 4 tests

Worth The Read: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.23 ▼1.004.17 ▲2.5238.31 ▼2.24
Dashboard /wp-admin2,241 ▲565.85 ▼0.01107.14 ▲7.6741.98 ▲1.96
Posts /wp-admin/edit.php2,132 ▲612.05 ▼0.0238.88 ▲2.8132.75 ▼1.85
Add New Post /wp-admin/post-new.php6,276 ▲4,74625.91 ▲7.77890.37 ▲269.0052.28 ▼9.13
Media Library /wp-admin/upload.php1,431 ▲464.26 ▲0.0998.23 ▲2.1942.30 ▲0.51
Time Commitment /wp-admin/admin.php?page=wtr_options&tab=42,4144.98139.76118.50
Redux /wp-admin/options-general.php?page=redux-framework1,0313.3470.0579.42
Import / Export /wp-admin/admin.php?page=wtr_options&tab=72,1965.0576.49210.64
Reading Progress /wp-admin/admin.php?page=wtr_options&tab=12,4065.16108.8985.96

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 detected upon uninstall: 9 options
    • wtr_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wtr_settings-transients
    • wtr_debug_messages
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtr_options&tab=1
    • > User deprecated in wp-includes/functions.php+5453
    Function get_wordpress_data is deprecated since version 4.0.0! Use wordpress_data->get( $type, $args, $opt_name, $value ) instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/image_select/field_image_select.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/core/newsflash.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/dimensions/field_dimensions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/date/field_date.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/editor/field_editor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/textarea/field_textarea.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/media/field_media.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/core/enqueue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/worth-the-read/options/templates/panel/header-stickybar.tpl.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/worth-the-read/options/inc/fields/select_image/field_select_image.php:8

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 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === worth-the-read === )
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in worth-the-read/assets to your readme.txt
The official readme.txt is a good inspiration

worth-the-read/worth-the-read.php Passed 13 tests

The principal PHP file in "Worth The Read" v. 1.14.1 is loaded by WordPress automatically on each request
125 characters long description:
Adds read length progress bar to single posts and pages, as well as an optional reading time commitment label to post titles.

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin78,693 lines of code in 556 files:
LanguageFilesBlank linesComment linesLines of code
PHP2016,99712,45428,492
JavaScript1416,1643,39025,909
Sass971,8727912,601
CSS1106,68931910,742
SVG600946
Markdown1103

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity37.51
▷ Minimum class complexity1.00
▷ Maximum class complexity322.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes144
▷ Abstract classes42.78%
▷ Concrete classes14097.22%
▷ Final classes00.00%
Methods1,055
▷ Static methods27926.45%
▷ Public methods82378.01%
▷ Protected methods14013.27%
▷ Private methods928.72%
Functions43
▷ Named functions3888.37%
▷ Anonymous functions511.63%
Constants103
▷ Global constants00.00%
▷ Class constants103100.00%
▷ Public constants103100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
57 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
options/assets/img/right.png0.15KB0.11KB▼ 28.57%
options/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB0.00%
options/assets/img/raw/2cl.png2.91KB0.24KB▼ 91.79%
options/assets/img/raw/3cr.png2.98KB0.34KB▼ 88.66%
options/assets/img/3cr.png0.33KB0.34KB0.00%