84% escaping-checker

Code Review | Escaping Checker

WordPress plugin Escaping Checker scored84%from 54 tests.

About plugin

  • Plugin page: escaping-checker
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.95
  • WordPress version: 6.3.1
  • First release: Dec 26, 2015
  • Latest release: Apr 17, 2018
  • Number of updates: 6
  • Update frequency: every 149.3 days
  • Top authors: TJNowell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /870 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Escaping Checker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.98 ▲0.07
Dashboard /wp-admin3.31 ▲0.0052.94 ▲0.68
Posts /wp-admin/edit.php3.36 ▲0.0051.69 ▲1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.46 ▼18.96
Media Library /wp-admin/upload.php3.23 ▲0.0041.10 ▲5.59

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Escaping Checker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.80 ▲0.351.94 ▼0.2339.93 ▼2.23
Dashboard /wp-admin2,218 ▲185.84 ▼0.04102.80 ▼7.6038.81 ▼14.89
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0235.31 ▼10.1631.34 ▼7.53
Add New Post /wp-admin/post-new.php1,545 ▲1222.85 ▼0.49672.08 ▲4.3852.93 ▼15.29
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.0297.79 ▼12.9743.43 ▼1.42

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/escaping-checker/tomjn_escaping.php:142

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: security

escaping-checker/tomjn_escaping.php 92% from 13 tests

The principal PHP file in "Escaping Checker" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("escaping-checker.php" instead of "tomjn_escaping.php")

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 detected643 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript18810535
PHP1826108

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin