89% yydevelopment-accessibility

Code Review | Simple Accessibility Button

WordPress plugin Simple Accessibility Button scored89%from 54 tests.

About plugin

  • Plugin page: yydevelopment-acc...
  • Plugin version: 2.1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 18, 2020
  • Latest release: Aug 21, 2023
  • Number of updates: 41
  • Update frequency: every 29.8 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /3,122 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: ▲0.03MB] [CPU: ▼4.56ms] Passed 4 tests

Analyzing server-side resources used by Simple Accessibility Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0946.42 ▲5.03
Dashboard /wp-admin3.34 ▲0.0446.53 ▼5.52
Posts /wp-admin/edit.php3.39 ▲0.0349.14 ▲1.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.41 ▼14.23
Media Library /wp-admin/upload.php3.26 ▲0.0337.90 ▲0.37
YYDevelopment Accessibility /wp-admin/options-general.php?page=yydev-accessibility3.3037.21

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
yydev_accessibility_timestamp
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
yydev_accessibility_data
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Simple Accessibility Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.34 ▼1.288.00 ▲6.3339.41 ▼5.10
Dashboard /wp-admin2,202 ▲225.63 ▲0.1182.80 ▼21.1138.07 ▼5.41
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0235.99 ▲0.6438.44 ▲6.48
Add New Post /wp-admin/post-new.php1,529 ▲323.59 ▲0.57650.10 ▼35.0258.83 ▲3.40
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0997.82 ▼10.1541.31 ▼5.57
YYDevelopment Accessibility /wp-admin/options-general.php?page=yydev-accessibility1,4253.1140.9267.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • yydev_accessibility_timestamp
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • yydev_accessibility_data
    • widget_recent-posts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

yydevelopment-accessibility/index.php 92% from 13 tests

The main PHP script in "Simple Accessibility Button" version 2.1.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("yydevelopment-accessibility.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,211 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9410216959
JavaScript112991192
PO File2151660

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1684.21%
▷ Anonymous functions315.79%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png8.78KB3.96KB▼ 54.86%
images/accessibility-icons.png0.37KB0.38KB0.00%
images/accessibility-icon.png0.37KB0.38KB0.00%