68% easy-reading-mode

Code Review | Easy Reading Mode

WordPress plugin Easy Reading Mode scored68%from 54 tests.

About plugin

  • Plugin page: easy-reading-mode
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Nov 7, 2014
  • Latest release: Jun 17, 2015
  • Number of updates: 51
  • Update frequency: every 4.4 days
  • Top authors: spgandhi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /2,729 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼37.90ms] Passed 4 tests

Analyzing server-side resources used by Easy Reading Mode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.09 ▼16.07
Dashboard /wp-admin3.03 ▼0.2723.15 ▼23.84
Posts /wp-admin/edit.php3.03 ▼0.3225.39 ▼23.72
Add New Post /wp-admin/post-new.php3.03 ▼2.8523.99 ▼87.98
Media Library /wp-admin/upload.php3.03 ▼0.2022.43 ▼12.26
Easy Reading Mode /wp-admin/options-general.php?page=erm-options-page3.0326.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 8 new options
New WordPress options
erm_is_activated
db_upgraded
can_compress_scripts
widget_recent-posts
erm_is_first_time
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Easy Reading Mode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.81 ▲0.411.88 ▼0.1444.03 ▲2.58
Dashboard /wp-admin2,207 ▲335.80 ▼0.0797.06 ▼15.0741.01 ▼6.70
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0238.85 ▼3.5532.83 ▼2.72
Add New Post /wp-admin/post-new.php1,545 ▲318.33 ▲0.10625.58 ▲21.0256.29 ▼2.93
Media Library /wp-admin/upload.php1,386 ▲14.24 ▲0.03102.31 ▲2.8242.66 ▼3.15
Easy Reading Mode /wp-admin/options-general.php?page=erm-options-page9411.7526.1036.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ERM_Admin::erm_register_settings() should not be called statically
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • erm_is_activated
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • erm_is_first_time
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=erm-options-page
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ERM_Admin::erm_register_settings() should not be called statically
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=erm-options-page
    • > Notice in wp-content/plugins/easy-reading-mode/class.erm-admin.php+175
    Undefined index: help-text
    • > GET request to /wp-admin/options-general.php?page=erm-options-page
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ERM_Admin::erm_admin_notice() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=erm-options-page
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ERM_Admin::erm_options_page() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=erm-options-page
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method ERM_Admin::section_one_callback() should not be called statically
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=erm-options-page
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method ERM_Admin::erm_field_callback() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-reading-mode/easy-reading-mode.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that require attention: The official readme.txt might help

easy-reading-mode/easy-reading-mode.php Passed 13 tests

"Easy Reading Mode" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
84 characters long description:
This plugin allows users to read your blog/article in distraction free reading mode.

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
No dangerous file extensions were detected1,519 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript414845850
CSS26014400
PHP38552260
HTML1309

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.50
▷ Minimum class complexity7.00
▷ Maximum class complexity16.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jscolor/hs.png2.62KB7.54KB0.00%
jscolor/hv.png2.80KB7.32KB0.00%