84% wp-accessibility

Code Review | WP Accessibility

WordPress plugin WP Accessibility scored84%from 54 tests.

About plugin

  • Plugin page: wp-accessibility
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 22, 2012
  • Latest release: Nov 25, 2023
  • Number of updates: 209
  • Update frequency: every 19.4 days
  • Top authors: joedolson (100%)

Code review

54 tests

User reviews

64 reviews

Install metrics

40,000+ active /939,600 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.38ms] Passed 4 tests

Server-side resources used by WP Accessibility
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0936.54 ▼8.12
Dashboard /wp-admin3.39 ▲0.0550.85 ▼8.28
Posts /wp-admin/edit.php3.43 ▲0.0748.22 ▲2.34
Add New Post /wp-admin/post-new.php6.22 ▲0.3392.91 ▲4.60
Media Library /wp-admin/upload.php3.30 ▲0.0732.95 ▼3.45
WP Accessibility /wp-admin/admin.php?page=wp-accessibility3.2737.21
Get Help /wp-admin/admin.php?page=wp-accessibility-help3.2732.35
Accessibility Stats /wp-admin/edit.php?post_type=wpa-stats3.4142.44
Stats Types /wp-admin/edit-tags.php?taxonomy=wpa-stats-type&post_type=wpa-stats3.3837.83

Server storage [IO: ▲0.47MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 63 new files
Database: no new tables, 20 new options
New WordPress options
db_upgraded
asl_styles_passive
widget_theysaidso_widget
wpa_focus
widget_recent-comments
asl_styles_focus
wpa-stats-type_children
theysaidso_admin_options
wpa_tabindex
wpa_continue
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Accessibility
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,115 ▲34313.92 ▼0.4516.60 ▲14.3439.76 ▼12.07
Dashboard /wp-admin2,387 ▲2105.83 ▲0.1496.24 ▼0.3250.03 ▲6.58
Posts /wp-admin/edit.php2,160 ▲601.96 ▼0.0539.26 ▼0.1934.25 ▲1.78
Add New Post /wp-admin/post-new.php6,282 ▲4,75626.18 ▲3.19933.36 ▲255.5658.06 ▲3.38
Media Library /wp-admin/upload.php1,454 ▲604.19 ▼0.0196.86 ▼7.4642.26 ▼3.80
WP Accessibility /wp-admin/admin.php?page=wp-accessibility2,1565.71140.8980.87
Get Help /wp-admin/admin.php?page=wp-accessibility-help1,3393.6475.2248.03
Accessibility Stats /wp-admin/edit.php?post_type=wpa-stats1,7802.2437.0429.72
Stats Types /wp-admin/edit-tags.php?taxonomy=wpa-stats-type&post_type=wpa-stats1,5482.1329.5734.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • asl_default_styles
    • db_upgraded
    • widget_theysaidso_widget
    • wpa-stats-type_children
    • wpa_post_types
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-accessibility/wp-accessibility-stats.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-accessibility/wp-accessibility.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-accessibility/templates/longdesc-template.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

wp-accessibility/wp-accessibility.php Passed 13 tests

The main PHP script in "WP Accessibility" version 2.1.4 is automatically included on every request by WordPress
83 characters long description:
Helps improve accessibility in your WordPress site, like removing title attributes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin4,957 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP112319532,390
CSS123041211,615
JavaScript136870805
JSON100119
SVG40328

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions82
▷ Named functions8097.56%
▷ Anonymous functions22.44%
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
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
toolbar/fonts/css/PNG/icon-fontsize.png0.17KB0.13KB▼ 23.53%
toolbar/fonts/css/PNG/icon-contrast.png0.71KB0.40KB▼ 43.47%
imgs/Equalize-Digital-Accessibility-Emblem-400x400-1.png8.85KB9.29KB0.00%
imgs/awd-logo-disc.png11.02KB4.69KB▼ 57.43%
toolbar/fonts/css/PNG/icon-saturation.png0.67KB0.36KB▼ 45.96%