94% wcag-validator

Code Review | WCAG Validator

WordPress plugin WCAG Validator scored 94% from 54 tests.

About plugin

  • Plugin page: wcag-validator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.1
  • WordPress version: 5.9.2
  • First release: Feb 7, 2016
  • Latest release: Feb 7, 2016
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: potreb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 806 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼296.67ms] Passed 4 tests

A check of server-side resources used by WCAG Validator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0251.43 ▲0.02
Dashboard /wp-admin3.43 ▲0.0332.37 ▼0.03
Posts /wp-admin/edit.php3.66 ▲0.0239.64 ▼0.48
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.28 ▼1,186.18
Media Library /wp-admin/upload.php3.31 ▲0.0224.57 ▲0.11
WCAG Validator /wp-admin/tools.php?page=wcag-validator3.2821.52

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WCAG Validator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.89 ▼0.115.94 ▼1.422.33 ▼0.65
Dashboard /wp-admin2,897 ▲466.08 ▼0.29113.90 ▼20.75158.20 ▼3.86
Posts /wp-admin/edit.php2,704 ▲133.24 ▲0.0163.30 ▼4.70136.19 ▼4.97
Add New Post /wp-admin/post-new.php1,692 ▲3117.48 ▲1.42438.24 ▲14.49172.32 ▲17.32
Media Library /wp-admin/upload.php1,703 ▲25.53 ▲0.09140.79 ▼15.35189.25 ▲2.56
WCAG Validator /wp-admin/tools.php?page=wcag-validator9922.3851.5999.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wcag-validator/wcag-validator.php:435

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 Passed 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
7 plugin tags: validator, wcag, validate, wcag 20, wcag validator...

wcag-validator/wcag-validator.php Passed 13 tests

The main file in "WCAG Validator" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
118 characters long description:
Validate all posts with WCAG standard. Plugin generate a new report after saving post. You can also validate all post.

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
No dangerous file extensions were detected354 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26233354

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity61.00
▷ Minimum class complexity61.00
▷ Maximum class complexity61.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.27MB with 0.18MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png222.04KB69.86KB▼ 68.54%
screenshot-1.png55.09KB19.01KB▼ 65.49%