78% accessibility

Code Review | Accessibility

WordPress plugin Accessibility scored 78% from 54 tests.

About plugin

  • Plugin page: accessibility
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.3
  • WordPress version: 5.9.2
  • First release: Aug 16, 2016
  • Latest release: Nov 5, 2020
  • Number of updates: 10
  • Update frequency: every 154.2 days
  • Top authors: ohadsh535 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 8,748 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
Installer ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼324.89ms] Passed 4 tests

A check of server-side resources used by Accessibility
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1155.33 ▲2.58
Dashboard /wp-admin3.14 ▼0.2718.08 ▼14.40
Posts /wp-admin/edit.php3.14 ▼0.5018.41 ▼19.05
Add New Post /wp-admin/post-new.php3.14 ▼3.8317.49 ▼1,260.39
Media Library /wp-admin/upload.php3.14 ▼0.1518.47 ▼5.72
Accessibility /wp-admin/admin.php?page=oc-accessibility-admin3.1418.73
Attachments alt /wp-admin/admin.php?page=oc-accessibility-media3.1417.25

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Accessibility
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲9015.94 ▲0.306.31 ▲0.632.93 ▲0.62
Dashboard /wp-admin2,928 ▲776.16 ▼0.09118.22 ▼20.50158.51 ▼2.74
Posts /wp-admin/edit.php2,724 ▲393.25 ▼0.0063.83 ▼5.02141.18 ▼4.62
Add New Post /wp-admin/post-new.php1,776 ▲321.03 ▼0.69445.88 ▼20.63155.87 ▼2.42
Media Library /wp-admin/upload.php1,731 ▲335.48 ▼0.06150.11 ▲12.37189.65 ▲2.53
Accessibility /wp-admin/admin.php?page=oc-accessibility-admin1,1062.3855.54176.62
Attachments alt /wp-admin/admin.php?page=oc-accessibility-media1,1432.4255.44114.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=oc-accessibility-media
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 | This is a smoke test targeting browser errors/issues
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can take inspiration from this readme.txt

accessibility/accessibility.php Passed 13 tests

This is the main PHP file of "Accessibility" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected591 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47262395
CSS135109
PO File1303387

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.50
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%