56% jwp-a11y

Code Review | jwp-a11y

WordPress plugin jwp-a11y scored 56% from 54 tests.

About plugin

  • Plugin page: jwp-a11y
  • Plugin version: 4.1.7
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.3-6.0.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2016
  • Latest release: Sep 12, 2023
  • Number of updates: 163
  • Update frequency: every 15.1 days
  • Top authors: jidaikobo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 7,683 total downloads

Benchmarks

Plugin footprint 65% 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: ▲2.68MB] [CPU: ▲38.74ms] Passed 4 tests

This is a short check of server-side resources used by jwp-a11y
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.21 ▲1.7558.65 ▲16.88
Dashboard /wp-admin6.53 ▲3.2299.45 ▲51.76
Posts /wp-admin/edit.php6.53 ▲3.17107.64 ▲55.52
Add New Post /wp-admin/post-new.php8.47 ▲2.59129.61 ▲30.80
Media Library /wp-admin/upload.php6.53 ▲3.3095.32 ▲61.03
jwp-a11y Setting /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_setting6.5478.46
Show Images /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_image6.5492.77
Checklist /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_checklist6.5479.78
Document /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_doc6.5475.76
A11y Center /wp-admin/admin.php?page=jwp-a11y6.5478.63
Issue /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_issue6.5485.18
Show Live /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_live6.5475.97
Show Result /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_result6.5477.72
ICL /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_icl6.5478.34
Download Issue /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_download6.5473.45

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 424 new files
Database: 1 new table, 6 new options
New tables
wp_jwp_a11yc_data
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for jwp-a11y
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.63 ▼0.911.70 ▼0.1039.05 ▼8.25
Dashboard /wp-admin2,308 ▲1235.30 ▲0.38116.67 ▲10.6140.25 ▼4.86
Posts /wp-admin/edit.php2,176 ▲802.11 ▲0.1142.56 ▼1.2634.56 ▲1.57
Add New Post /wp-admin/post-new.php1,615 ▲9623.06 ▲0.21692.69 ▲85.5255.92 ▲8.07
Media Library /wp-admin/upload.php1,472 ▲814.77 ▲0.5095.92 ▼4.0442.01 ▼2.55
jwp-a11y Setting /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_setting1,6272.1436.9449.45
Show Images /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_image8732.0032.6124.64
Checklist /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_checklist110.440.065.03
Document /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_doc2,5332.0431.4730.47
A11y Center /wp-admin/admin.php?page=jwp-a11y1,0131.9829.7029.54
Issue /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_issue9062.0029.1027.30
Show Live /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_live110.440.076.33
Show Result /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_result8642.0027.4621.98
ICL /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_icl8992.1034.0831.70
Download Issue /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_download110.440.000.00

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_jwp_a11yc_data
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_download
    • > Warning in wp-content/plugins/jwp-a11y/a11yc/classes/File.php+87
    file_put_contents(/tmpa11yc.csv): failed to open stream: Permission denied
    • > GET request to /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_download
    • > Warning in wp-content/plugins/jwp-a11y/a11yc/classes/File.php+91
    filesize(): stat failed for /tmpa11yc.csv
    • > GET request to /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_download
    • > Warning in wp-content/plugins/jwp-a11y/a11yc/classes/File.php+96
    readfile(/tmpa11yc.csv): failed to open stream: No such file or directory

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 33× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/jwp-a11y/a11yc/views/doc/index.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/setting/inc_ua.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/inc_progress_header.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/setting/site.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/doc/search.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/footer.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/post/docs/search.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/data/import.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/download/issue.php
    • > /wp-content/plugins/jwp-a11y/a11yc/views/result/page.php
  • 561× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/jwp-a11y/a11yc/libs/guzzle/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Warning
      Use of undefined constant A11YC_LANG_UA_IPHONE - assumed 'A11YC_LANG_UA_IPHONE' (this will throw an Error in a future version of PHP) in wp-content/plugins/jwp-a11y/a11yc/views/post/index.php on line 12
    • > PHP Warning
      Use of undefined constant A11YC_LANG_SETTING_TITLE_BASE - assumed 'A11YC_LANG_SETTING_TITLE_BASE' (this will throw an Error in a future version of PHP) in wp-content/plugins/jwp-a11y/a11yc/views/setting/inc_submenu.php on line 3
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/jwp-a11y/a11yc/views/post/header.php on line 26
    • > PHP Notice
      Undefined variable: user_agent in wp-content/plugins/jwp-a11y/a11yc/views/post/index.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'A11yc\\Validate' not found in wp-content/plugins/jwp-a11y/a11yc/classes/Validate/Check/DuplicatedIdsAndAccesskey.php:16
    • > PHP Warning
      Use of undefined constant A11YC_LANG_CRITERION - assumed 'A11YC_LANG_CRITERION' (this will throw an Error in a future version of PHP) in wp-content/plugins/jwp-a11y/a11yc/views/inc_criterions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/jwp-a11y/a11yc/libs/guzzle/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'A11yc\\Controller\\Checklist' not found in wp-content/plugins/jwp-a11y/a11yc/classes/Controller/Bulk.php:15
    • > PHP Notice
      Undefined variable: issues in wp-content/plugins/jwp-a11y/a11yc/views/issue/inc_submenu.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_icl
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:11743 Uncaught Error: Syntax error, unrecognized expression: a[href^=#]
    • > GET request to /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_checklist
    • > Network (severe)
    wp-admin/admin.php?page=jwp-a11y/jwp_a11y_checklist - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=jwp-a11y/jwp_a11y_live
    • > Network (severe)
    wp-admin/admin.php?page=jwp-a11y/jwp_a11y_live - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: accessibility, wcag, checker, jis x 8341-3

jwp-a11y/jwp-a11y.php 85% from 13 tests

"jwp-a11y" version 4.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 187 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin54,323 lines of code in 397 files:
LanguageFilesBlank linesComment linesLines of code
PHP3554,63612,45035,680
YAML184951059,443
CSS6751634,425
Markdown1194803,189
SVG100685
JavaScript369141589
JSON100241
PO File133662
make1409

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity12.87
▷ Minimum class complexity1.00
▷ Maximum class complexity257.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces24
Interfaces17
Traits27
Classes211
▷ Abstract classes00.00%
▷ Concrete classes211100.00%
▷ Final classes73.32%
Methods1,397
▷ Static methods72351.75%
▷ Public methods1,06075.88%
▷ Protected methods90.64%
▷ Private methods32823.48%
Functions160
▷ Named functions6238.75%
▷ Anonymous functions9861.25%
Constants992
▷ Global constants94395.06%
▷ Class constants494.94%
▷ Public constants49100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png5.75KB1.37KB▼ 76.13%
assets/img/logo_author.png13.96KB7.27KB▼ 47.93%