84% validated

Code Review | Validated

WordPress plugin Validated scored84%from 54 tests.

About plugin

  • Plugin page: validated
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.3
  • WordPress version: 6.3.1
  • First release: Dec 22, 2008
  • Latest release: Dec 4, 2019
  • Number of updates: 14
  • Update frequency: every 285.6 days
  • Top authors: collinsinternet (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /23,925 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.05MB] [CPU: ▼5.78ms] Passed 4 tests

Analyzing server-side resources used by Validated
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.13 ▼2.35
Dashboard /wp-admin3.35 ▲0.0550.17 ▼7.55
Posts /wp-admin/edit.php3.41 ▲0.0548.89 ▼2.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.33 ▼11.00
Media Library /wp-admin/upload.php3.28 ▲0.0537.78 ▼1.07

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Validated
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.68 ▼0.061.71 ▼0.2844.31 ▼2.68
Dashboard /wp-admin2,206 ▲295.67 ▲0.1590.68 ▼12.9739.92 ▼6.20
Posts /wp-admin/edit.php2,147 ▲502.07 ▼0.0839.18 ▲2.4339.25 ▲0.61
Add New Post /wp-admin/post-new.php1,537 ▲923.09 ▼0.02666.98 ▲5.2850.46 ▲3.70
Media Library /wp-admin/upload.php1,411 ▲114.29 ▲0.0999.00 ▼17.0142.02 ▼6.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/validated/tests/test-validated.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Ajax_UnitTestCase' not found in wp-content/plugins/validated/tests/test-ajax.php:13
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/validated/tests/bootstrap.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/validated/validated.php:26
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/validated/tests/bootstrap.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/validated/views/report.php:9

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: xhtml, validation, w3c, code, html

validated/validated.php Passed 13 tests

The entry point to "Validated" version 2.1.2 is a PHP file that has certain tags in its header comment area
34 characters long description:
W3C validation on pages and posts.

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
There were no executable files found in this plugin671 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP671217308
JavaScript42555188
Bourne Shell121685
JSON20044
XML12021
CSS25020
Markdown1105

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.67
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods1875.00%
▷ Protected methods625.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin