84% accessibility-statement

Code Review | Accessibility Statement

WordPress plugin Accessibility Statement scored84%from 54 tests.

About plugin

  • Plugin page: accessibility-sta...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 7, 2022
  • Latest release: Dec 13, 2022
  • Number of updates: 6
  • Update frequency: every 52.2 days
  • Top authors: turn.lv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /685 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.74MB] [CPU: ▲19.76ms] Passed 4 tests

This is a short check of server-side resources used by Accessibility Statement
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.00 ▲3.5457.56 ▲18.56
Dashboard /wp-admin7.07 ▲3.7766.36 ▲17.67
Posts /wp-admin/edit.php7.18 ▲3.8374.61 ▲29.03
Add New Post /wp-admin/post-new.php9.78 ▲3.89110.90 ▲16.72
Media Library /wp-admin/upload.php7.07 ▲3.8464.45 ▲26.10
A11y statement settings /wp-admin/options-general.php?page=a11y-statement-settings6.9658.80

Server storage [IO: ▲8.79MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 260 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
a11y_statement_options
can_compress_scripts
db_upgraded
acf_version
widget_recent-posts
a11yStatement_post_id
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Accessibility Statement
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.24 ▼1.322.04 ▲0.4242.02 ▲2.27
Dashboard /wp-admin2,215 ▲234.86 ▼0.05115.23 ▲0.3441.47 ▼6.46
Posts /wp-admin/edit.php2,098 ▲92.00 ▲0.0041.20 ▲2.6835.77 ▲1.06
Add New Post /wp-admin/post-new.php11,441 ▲9,76527.34 ▲2.631,233.88 ▲595.8041.14 ▼6.86
Media Library /wp-admin/upload.php1,949 ▲5588.19 ▲3.94222.17 ▲118.8248.40 ▲5.83
A11y statement settings /wp-admin/options-general.php?page=a11y-statement-settings7822.0631.0931.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • acf_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 75× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-date_picker.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_render_field_wrap() in wp-content/plugins/accessibility-statement/includes/acf/includes/admin/views/field-group-options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-output.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-google-map.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-file.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ACF_Field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-user.php:5
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/accessibility-statement/includes/acf/includes/admin/views/html-location-rule.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-wysiwyg.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/accessibility-statement/includes/acf/includes/fields/class-acf-field-time_picker.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/accessibility-statement/includes/acf/includes/admin/views/html-admin-page-upgrade-network.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

accessibility-statement/accessibility-statement.php 92% from 13 tests

The entry point to "Accessibility Statement" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin114,458 lines of code in 205 files:
LanguageFilesBlank linesComment linesLines of code
PO File3224,38341,44950,303
JavaScript175,8835,98938,456
PHP1398,54618,22519,601
CSS154957396,078
Markdown111014
SVG1006

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.50
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes105
▷ Abstract classes21.90%
▷ Concrete classes10398.10%
▷ Final classes00.00%
Methods791
▷ Static methods10.13%
▷ Public methods77297.60%
▷ Protected methods00.00%
▷ Private methods192.40%
Functions439
▷ Named functions43699.32%
▷ Anonymous functions30.68%
Constants8
▷ Global constants8100.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
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/acf/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/inc/datepicker/images/ui-icons_444444_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
includes/acf/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%