72% ms-scc-accessibility-tools

Code Review | MS Accessibility Tools

WordPress plugin MS Accessibility Tools scored72%from 54 tests.

About plugin

  • Plugin page: ms-scc-accessibil...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.3
  • WordPress version: 6.3.1
  • First release: May 16, 2018
  • Latest release: Sep 5, 2019
  • Number of updates: 8
  • Update frequency: every 59.8 days
  • Top authors: thteix (62.5%)thiagolt90 (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.63MB] [CPU: ▼14.99ms] Passed 4 tests

A check of server-side resources used by MS Accessibility Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.67 ▲0.40
Dashboard /wp-admin3.34 ▲0.0451.69 ▼0.54
Posts /wp-admin/edit.php3.39 ▲0.0451.06 ▲1.55
Add New Post /wp-admin/post-new.php3.24 ▼2.6540.43 ▼56.17
Media Library /wp-admin/upload.php3.27 ▲0.0436.63 ▼3.63
Accessibility Tools /wp-admin/admin.php?page=AccessibilityToolsPreferences3.2132.50
Bulk Optimize /wp-admin/admin.php?page=AccessibilityToolsBulk3.2239.76

Server storage [IO: ▲0.05MB] [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: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for MS Accessibility Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.34 ▼0.001.94 ▼0.2643.76 ▼4.41
Dashboard /wp-admin2,225 ▲485.63 ▲0.0395.91 ▼6.5540.01 ▼2.35
Posts /wp-admin/edit.php2,124 ▲212.04 ▼0.0639.01 ▲4.0638.81 ▲2.80
Add New Post /wp-admin/post-new.php1,549 ▲2123.17 ▲0.29675.92 ▼23.4264.38 ▲10.39
Media Library /wp-admin/upload.php1,430 ▲364.21 ▼0.0097.05 ▼6.7645.11 ▲0.85
Accessibility Tools /wp-admin/admin.php?page=AccessibilityToolsPreferences9582.0023.1027.07
Bulk Optimize /wp-admin/admin.php?page=AccessibilityToolsBulk8802.1525.6830.12

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=AccessibilityToolsPreferences
    • > Notice in wp-content/plugins/ms-scc-accessibility-tools/src/Modules/AccessibilityTools.php+7
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=AccessibilityToolsPreferences
    • > Notice in wp-content/plugins/ms-scc-accessibility-tools/src/Modules/AccessibilityTools.php+32
    Undefined variable: msat_languages
    • > GET request to /wp-admin/admin.php?page=AccessibilityToolsBulk
    • > Warning in wp-content/plugins/ms-scc-accessibility-tools/src/Modules/AccessibilityTools.php+64
    Division by zero
    • > GET request to /wp-admin/admin.php?page=AccessibilityToolsBulk
    • > Notice in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php+25
    Undefined variable: posts_finished

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: total_posts_progress in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 25
    • > PHP Notice
      Undefined variable: total_optimized_posts in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 22
    • > PHP Notice
      Undefined variable: total_images_progress in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 11
    • > PHP Notice
      Undefined variable: posts_finished in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 25
    • > PHP Notice
      Undefined variable: total_posts_progress in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 25
    • > PHP Notice
      Undefined variable: total_optimized_images in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'MSAT_AccessibilityTools' not found in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/preferences.php:9
    • > PHP Notice
      Undefined variable: images_finished in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 11
    • > PHP Notice
      Undefined variable: total_images in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 8
    • > PHP Notice
      Undefined variable: total_images_progress in wp-content/plugins/ms-scc-accessibility-tools/src/Partials/AccessibilityTools/bulk.php on line 11

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === ms-scc-accessibility-tools === )
The official readme.txt is a good inspiration

ms-scc-accessibility-tools/ms-scc-accessibility-tools.php 92% from 13 tests

Analyzing the main PHP file in "MS Accessibility Tools" version 1.0.2
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected1,776 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS212121,156
PHP911354600
Markdown16020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1270.59%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants418.18%
▷ Class constants1881.82%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin