68% accessibility

Code Review | Accessibility

WordPress plugin Accessibility scored68%from 54 tests.

About plugin

  • Plugin page: accessibility
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Nov 1, 2022
  • Number of updates: 17
  • Update frequency: every 133.4 days
  • Top authors: ohadsh535 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /13,926 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼33.67ms] Passed 4 tests

Server-side resources used by Accessibility
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.90 ▼3.41
Dashboard /wp-admin3.05 ▼0.2624.36 ▼21.71
Posts /wp-admin/edit.php3.05 ▼0.3123.75 ▼23.47
Add New Post /wp-admin/post-new.php3.05 ▼2.8422.58 ▼75.05
Media Library /wp-admin/upload.php3.05 ▼0.1822.40 ▼14.46
Attachments alt /wp-admin/admin.php?page=oc-accessibility-media3.0525.73
Accessibility /wp-admin/admin.php?page=oc-accessibility-admin3.0522.61

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Accessibility
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.70 ▼0.765.57 ▲3.7239.70 ▼7.62
Dashboard /wp-admin2,232 ▲445.79 ▲0.72104.50 ▼5.6838.83 ▼2.72
Posts /wp-admin/edit.php2,121 ▲322.15 ▲0.0939.51 ▲4.7835.57 ▼0.17
Add New Post /wp-admin/post-new.php1,555 ▲4123.34 ▲5.68582.68 ▼46.1252.81 ▲2.91
Media Library /wp-admin/upload.php1,414 ▲324.20 ▲0.0397.16 ▼2.4940.83 ▼5.03
Attachments alt /wp-admin/admin.php?page=oc-accessibility-media8701.9323.2825.47
Accessibility /wp-admin/admin.php?page=oc-accessibility-admin9082.0524.1638.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=oc-accessibility-admin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accessibility/includes/accessibility-attachments-alt.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accessibility/includes/accessibility-settings.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
Please take inspiration from this readme.txt

accessibility/accessibility.php Passed 13 tests

Analyzing the main PHP file in "Accessibility" version 1.0.6
106 characters long description:
Accessibility Utility Widget - A high quality solution for making your WordPress website accessible ready.

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
Success! There were no dangerous files found in this plugin640 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47571443
CSS135110
PO File1303387

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.67
▷ Minimum class complexity3.00
▷ Maximum class complexity20.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2275.86%
▷ Protected methods00.00%
▷ Private methods724.14%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png6.00KB3.20KB▼ 46.64%
assets/images/text_logo.png6.31KB3.01KB▼ 52.30%