77% my-reading-time-lite

Code Review | My Reading Time Lite

WordPress plugin My Reading Time Lite scored77%from 54 tests.

About plugin

  • Plugin page: my-reading-time-lite
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2020
  • Latest release: Aug 21, 2023
  • Number of updates: 5
  • Update frequency: every 227.8 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 total downloads

Benchmarks

Plugin footprint 82% 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.08MB] [CPU: ▲953.58ms] 50% from 4 tests

Analyzing server-side resources used by My Reading Time Lite
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,332.57ms on /wp-admin/options-general.php?page=my-reading-time-settings)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 953.58ms on /wp-admin/options-general.php?page=my-reading-time-settings)
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.16715.01 ▲679.04
Dashboard /wp-admin3.76 ▲0.411,550.93 ▲1,492.63
Posts /wp-admin/edit.php3.68 ▲0.321,324.00 ▲1,278.15
Add New Post /wp-admin/post-new.php4.83 ▼1.06644.12 ▲560.38
Media Library /wp-admin/upload.php3.49 ▲0.271,329.19 ▲1,296.75
Recommended /wp-admin/admin.php?page=my-reading-time-lite-recommended-plugins3.491,289.64
My Reading Time /wp-admin/options-general.php?page=my-reading-time-settings3.491,332.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 17 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
jltmrt_notice_what_we_collect
recovery_mode_email_last_sent
widget_recent-comments
my_reading_time_lite_version
jltmrt_notice_subscribe
jltma_mrt_settings
widget_recent-posts
jltma_mrt_free_vs_pro
...

Browser metrics Passed 4 tests

An overview of browser requirements for My Reading Time Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,057 ▲31115.09 ▲0.944.12 ▲2.1122.00 ▼21.09
Dashboard /wp-admin2,497 ▲3236.42 ▲0.73117.95 ▲30.6039.49 ▼3.20
Posts /wp-admin/edit.php2,383 ▲2833.70 ▲1.7651.51 ▲15.2334.14 ▼0.65
Add New Post /wp-admin/post-new.php45 ▼1,4900.42 ▼17.880.08 ▼615.6911.19 ▼56.24
Media Library /wp-admin/upload.php1,514 ▲1204.31 ▲0.1285.72 ▼12.9343.42 ▼0.73
Recommended /wp-admin/admin.php?page=my-reading-time-lite-recommended-plugins1,4643.2845.8571.88
My Reading Time /wp-admin/options-general.php?page=my-reading-time-settings1,6863.5453.2040.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 17 options in the database
    • widget_theysaidso_widget
    • jltmrt_notice_what_we_collect
    • jltmrt_sheet_promo_data
    • jltmrt_notice_subscribe
    • jltma_mrt_settings
    • widget_recent-comments
    • my_reading_time_lite_version
    • jltmrt_sheet_promo_data_hash
    • jltmrt_activation_time
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Notifications/What_We_Collect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Libs\\Recommended' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Recommended_Plugins.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Libs\\Upgrader' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Upgrade_Plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Notifications/Subscribe.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Libs\\RowLinks' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Row_Links.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Inc\\Classes\otifications\\Model\\Popup' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Notifications/Upgrade_Notice.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/my-reading-time-lite/my-reading-time-lite.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'JLTMRT\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/my-reading-time-lite/Inc/Classes/Notifications/Ask_For_Rating.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=my-reading-time-settings
    • > Network (severe)
    wp-admin/text/javascript - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=my-reading-time-lite-recommended-plugins
    • > Network (severe)
    https://ps.w.org/ultimate-blocks-for-gutenberg/assets/icon-128x128.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (My Reading Time Lite Option), #2 (Reading Time in Post)
Please take inspiration from this readme.txt

my-reading-time-lite/my-reading-time-lite.php 85% from 13 tests

The primary PHP file in "My Reading Time Lite" version 1.0.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin5,831 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,0411,6504,899
CSS312615778
JavaScript2159154

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.31
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces0
Traits2
Classes30
▷ Abstract classes413.33%
▷ Concrete classes2686.67%
▷ Final classes13.85%
Methods237
▷ Static methods3313.92%
▷ Public methods23498.73%
▷ Protected methods10.42%
▷ Private methods20.84%
Functions14
▷ Named functions964.29%
▷ Anonymous functions535.71%
Constants16
▷ Global constants1593.75%
▷ Class constants16.25%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin