82% accessibility-enabler

Code Review | Accessibility Enabler

WordPress plugin Accessibility Enabler scored 82% from 54 tests.

About plugin

  • Plugin page: accessibility-ena...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 5.8.1
  • First release: Feb 1, 2019
  • Latest release: Nov 5, 2021
  • Number of updates: 39
  • Update frequency: every 28.0 days
  • Top authors: hikeorders30 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active / 5,212 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼143.03ms] Passed 4 tests

Analyzing server-side resources used by Accessibility Enabler
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1224.70 ▲6.25
Dashboard /wp-admin3.07 ▲0.0130.00 ▼5.82
Posts /wp-admin/edit.php3.13 ▲0.0232.69 ▲2.89
Add New Post /wp-admin/post-new.php5.44 ▼0.0068.32 ▼569.05
Media Library /wp-admin/upload.php3.02 ▲0.0222.18 ▼0.15
Accessibility Enabler /wp-admin/options-general.php?page=a11y-enabler3.0324.75

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Accessibility Enabler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,706 ▲10515.98 ▼0.006.44 ▼0.0275.89 ▼1.07
Dashboard /wp-admin2,935 ▲426.18 ▼0.01115.31 ▼17.68168.42 ▼4.59
Posts /wp-admin/edit.php2,742 ▲363.24 ▼0.0164.14 ▼2.03138.66 ▼2.19
Add New Post /wp-admin/post-new.php3,810 ▲7418.80 ▲0.22412.94 ▼21.20155.30 ▼8.45
Media Library /wp-admin/upload.php1,757 ▲55.55 ▲0.02142.54 ▲3.08183.76 ▼1.57
Accessibility Enabler /wp-admin/options-general.php?page=a11y-enabler1,2212.4153.21132.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=a11y-enabler
    • > Notice in wp-content/plugins/accessibility-enabler/admin/partials/plugin-a11y-enabler-display.php+69
    Trying to access array offset on value of type bool

SRP 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/accessibility-enabler/public/partials/a11y-enabler-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/accessibility-enabler/admin/partials/plugin-a11y-enabler-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Tags: Too many tags (27 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

accessibility-enabler/a11y-enabler.php 85% from 13 tests

The main PHP script in "Accessibility Enabler" version 1.5.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("accessibility-enabler.php" instead of "a11y-enabler.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 plugin302 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13209585296
JavaScript24546
CSS1040

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin