84% screen-reader-text-format

Code Review | Screen Reader Text Format

WordPress plugin Screen Reader Text Format scored84%from 54 tests.

About plugin

  • Plugin page: screen-reader-tex...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2021
  • Latest release: Mar 20, 2023
  • Number of updates: 6
  • Update frequency: every 145.5 days
  • Top authors: Nick_theGeek (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,030 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.88ms] Passed 4 tests

Analyzing server-side resources used by Screen Reader Text Format
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.47 ▼11.32
Dashboard /wp-admin3.33 ▲0.0256.46 ▲5.00
Posts /wp-admin/edit.php3.38 ▲0.0251.37 ▼0.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.54 ▼21.68
Media Library /wp-admin/upload.php3.25 ▲0.0238.62 ▲1.90

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Screen Reader Text Format
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.72 ▲0.371.87 ▼0.0246.21 ▲1.33
Dashboard /wp-admin2,195 ▲155.50 ▼0.1189.52 ▼1.4439.11 ▼0.66
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0636.00 ▼5.3734.29 ▼4.45
Add New Post /wp-admin/post-new.php1,538 ▲1223.31 ▼0.24657.15 ▼19.7060.01 ▲5.36
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0997.45 ▼8.1543.81 ▼2.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/screen-reader-text-format/screen-reader-text-format.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RKV\\Screen\\Reader\\Text\\Format\\add_action() in wp-content/plugins/screen-reader-text-format/src/init.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
No tags were detected

screen-reader-text-format/screen-reader-text-format.php 85% from 13 tests

The principal PHP file in "Screen Reader Text Format" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: Required version must match the one declared in readme.txt ("6.0" instead of "5.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected690 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript105548516
PHP2195771
Sass311459
CSS10044

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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
Namespaces1
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin