84% yoast-test-helper

Code Review | Yoast Test Helper

WordPress plugin Yoast Test Helper scored84%from 54 tests.

About plugin

  • Plugin page: yoast-test-helper
  • Plugin version: 1.17
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Apr 6, 2020
  • Latest release: Aug 4, 2023
  • Number of updates: 43
  • Update frequency: every 28.3 days
  • Top authors: Yoast (72.09%)joostdevalk (27.91%)ireneyoast (4.65%)

Code review

54 tests

User reviews

11 reviews

Install metrics

40,000+ active /323,769 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
Installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▲3.75ms] Passed 4 tests

This is a short check of server-side resources used by Yoast Test Helper
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5244.43 ▲6.44
Dashboard /wp-admin3.81 ▲0.5149.96 ▲0.95
Posts /wp-admin/edit.php3.93 ▲0.5752.30 ▲6.05
Add New Post /wp-admin/post-new.php6.39 ▲0.51100.50 ▲2.45
Media Library /wp-admin/upload.php3.74 ▲0.5139.44 ▲5.53
Yoast Test /wp-admin/tools.php?page=yoast-test-helper3.7340.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Yoast Test Helper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.33 ▼1.421.65 ▼0.2236.63 ▼8.10
Dashboard /wp-admin2,207 ▲155.82 ▲0.8495.32 ▼10.5737.17 ▼7.60
Posts /wp-admin/edit.php2,096 ▲42.00 ▼0.0139.23 ▼1.2133.80 ▼1.02
Add New Post /wp-admin/post-new.php1,545 ▲318.45 ▲0.17612.47 ▼11.3360.44 ▲7.08
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0396.09 ▼4.3940.67 ▼2.73
Yoast Test /wp-admin/tools.php?page=yoast-test-helper2,2741.8332.3647.54

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\Integration' not found in wp-content/plugins/yoast-test-helper/src/query-monitor.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'QM_Output_Html' not found in wp-content/plugins/yoast-test-helper/src/query-monitor-output.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\WordPress_Plugin' not found in wp-content/plugins/yoast-test-helper/src/wordpress-plugins/news-seo.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\Integration' not found in wp-content/plugins/yoast-test-helper/src/development-mode.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Debug_Bar_Panel' not found in wp-content/plugins/yoast-test-helper/src/admin-bar-panel.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\Integration' not found in wp-content/plugins/yoast-test-helper/src/feature-toggler.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\WordPress_Plugins\\WordPress_Plugin' not found in wp-content/plugins/yoast-test-helper/src/wordpress-plugins/local-seo.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\Integration' not found in wp-content/plugins/yoast-test-helper/src/taxonomies.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\Integration' not found in wp-content/plugins/yoast-test-helper/src/domain-dropdown.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\Test_Helper\\Integration' not found in wp-content/plugins/yoast-test-helper/src/inline-script.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: yoast seo, yoast, development

yoast-test-helper/yoast-test-helper.php 92% from 13 tests

The primary PHP file in "Yoast Test Helper" version 1.17 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin2,783 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP457661,7422,639
CSS117091
Markdown18028
JavaScript12020
JSON1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.58
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces2
Traits0
Classes36
▷ Abstract classes00.00%
▷ Concrete classes36100.00%
▷ Final classes00.00%
Methods256
▷ Static methods197.42%
▷ Public methods20078.12%
▷ Protected methods228.59%
▷ Private methods3413.28%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants4
▷ Global constants4100.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 are no PNG files in this plugin