84% accessibility-statement

Code Review | Accessibility Statement

WordPress plugin Accessibility Statement scored 84% 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-5.9
  • WordPress version: 5.9.2
  • First release: Feb 7, 2022
  • Latest release: Feb 24, 2022
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: turn.lv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 105 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲3.69MB] [CPU: ▼277.84ms] Passed 4 tests

This is a short check of server-side resources used by Accessibility Statement
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /7.02 ▲3.5175.58 ▲24.81
Dashboard /wp-admin7.16 ▲3.7663.01 ▲21.11
Posts /wp-admin/edit.php7.39 ▲3.7563.67 ▲27.01
Add New Post /wp-admin/post-new.php10.76 ▲3.76122.31 ▼1,178.33
Media Library /wp-admin/upload.php7.13 ▲3.8345.44 ▲21.04
A11y statement settings /wp-admin/options-general.php?page=a11y-statement-settings7.0242.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 260 new files
Database: no new tables, 3 new options
New WordPress options
a11y_statement_options
a11yStatement_post_id
acf_version

Browser metrics Passed 4 tests

A check of browser resources used by Accessibility Statement
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲2015.86 ▲0.175.95 ▼0.382.05 ▼1.06
Dashboard /wp-admin2,899 ▲456.14 ▲0.02125.48 ▼13.09160.07 ▼0.27
Posts /wp-admin/edit.php2,695 ▲13.23 ▼0.0164.11 ▲1.07144.81 ▲2.81
Add New Post /wp-admin/post-new.php2,551 ▲89023.72 ▲7.60587.24 ▲179.20163.13 ▲7.23
Media Library /wp-admin/upload.php2,360 ▲66210.68 ▲5.11224.45 ▲81.87186.60 ▲1.69
A11y statement settings /wp-admin/options-general.php?page=a11y-statement-settings1,0022.4156.25126.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • acf_version

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 75× PHP files trigger server-side errors or warnings 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-separator.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/accessibility-statement/includes/acf/includes/acf-input-functions.php:103
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/accessibility-statement/includes/acf/includes/admin/views/html-location-group.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_idify() in wp-content/plugins/accessibility-statement/includes/acf/includes/admin/views/field-group-field.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-date_picker.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-output.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/accessibility-statement/includes/acf/includes/admin/views/html-location-rule.php on line 4
    • > 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: Call to undefined function add_action() in wp-content/plugins/accessibility-statement/includes/acf/includes/forms/form-taxonomy.php:36
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this 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
It is important to fix the following:
  • 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected114,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

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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_DDDDDD_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/images/acf-logo.png3.40KB3.39KB0.23%
includes/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
includes/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
includes/acf/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%