73% wordpress-seo

Code Review | Yoast SEO

WordPress plugin Yoast SEO scored73%from 54 tests.

About plugin

  • Plugin page: wordpress-seo
  • Plugin version: 21.6
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Oct 11, 2010
  • Latest release: Nov 28, 2023
  • Number of updates: 1,653
  • Update frequency: every 3.3 days
  • Top authors: Yoast (59.23%)joostdevalk (23.65%)jipmoors (5.38%)atimmer (4.72%)DeFries (2.54%)

Code review

54 tests

User reviews

27608 reviews

Install metrics

5,000,000+ active /610,878,726 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲9.58MB] [CPU: ▲71.51ms] 50% from 4 tests

Server-side resources used by Yoast SEO
Please take the time to fix the following items
  • RAM: The total memory usage must be kept under 10MB (currently 12.69MB on /wp-admin/admin.php?page=wpseo_installation_successful_free)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 9.58MB on /wp-admin/admin.php?page=wpseo_installation_successful_free)
PageMemory (MB)CPU Time (ms)
Home /12.61 ▲9.14107.90 ▲63.40
Dashboard /wp-admin12.69 ▲9.38116.38 ▲60.15
Posts /wp-admin/edit.php13.75 ▲10.38146.99 ▲90.94
Add New Post /wp-admin/post-new.php17.78 ▲11.88197.32 ▲97.44
Media Library /wp-admin/upload.php12.64 ▲9.40107.13 ▲71.55
Redirects /wp-admin/admin.php?page=wpseo_redirects12.7099.85
/wp-admin/admin.php?page=wpseo_configurator12.0881.13
Support /wp-admin/admin.php?page=wpseo_page_support12.68114.66
Integrations /wp-admin/admin.php?page=wpseo_integrations12.70102.98
Settings /wp-admin/admin.php?page=wpseo_page_settings12.79108.17
Premium /wp-admin/admin.php?page=wpseo_licenses12.8197.05
General /wp-admin/admin.php?page=wpseo_dashboard13.10115.41
Workouts /wp-admin/admin.php?page=wpseo_workouts12.72102.67
Academy /wp-admin/admin.php?page=wpseo_page_academy12.70100.06
/wp-admin/admin.php?page=wpseo_installation_successful_free12.69110.05

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,286 new files
Database: 5 new tables, 10 new options
New tables
wp_yoast_indexable_hierarchy
wp_yoast_seo_links
wp_yoast_migrations
wp_yoast_primary_term
wp_yoast_indexable
New WordPress options
widget_recent-comments
widget_theysaidso_widget
wpseo
theysaidso_admin_options
can_compress_scripts
wpseo_social
wpseo_titles
yoast_migrations_free
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yoast SEO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,688 ▲92618.45 ▲3.691.80 ▲0.0627.64 ▼13.18
Dashboard /wp-admin2,975 ▲7959.32 ▲3.66174.21 ▲81.01110.66 ▲67.55
Posts /wp-admin/edit.php2,606 ▲5062.38 ▲0.3843.98 ▲2.7361.26 ▲24.30
Add New Post /wp-admin/post-new.php2,422 ▲89626.92 ▲3.841,015.40 ▲365.5891.43 ▲39.65
Media Library /wp-admin/upload.php1,690 ▲2904.17 ▲0.0395.34 ▼1.4642.02 ▼0.74
Redirects /wp-admin/admin.php?page=wpseo_redirects1,52611.34226.51109.88
/wp-admin/admin.php?page=wpseo_configurator2,23216.13255.88105.06
Support /wp-admin/admin.php?page=wpseo_page_support1,3838.4596.3161.14
Integrations /wp-admin/admin.php?page=wpseo_integrations1,89913.59183.26135.59
Settings /wp-admin/admin.php?page=wpseo_page_settings1,69812.11259.0651.28
Premium /wp-admin/admin.php?page=wpseo_licenses1,85411.65113.5677.60
General /wp-admin/admin.php?page=wpseo_dashboard2,23016.02198.3879.60
Workouts /wp-admin/admin.php?page=wpseo_workouts1,58413.88166.1097.98
Academy /wp-admin/admin.php?page=wpseo_page_academy1,50210.04110.7736.31
/wp-admin/admin.php?page=wpseo_installation_successful_free1,27011.80125.7136.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 5 tables
    • wp_yoast_seo_links
    • wp_yoast_migrations
    • wp_yoast_indexable_hierarchy
    • wp_yoast_primary_term
    • wp_yoast_indexable
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • wpseo_titles
    • wpseo
    • wpseo_social
    • yoast_migrations_free
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
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
Please fix the following items
  • 600× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\SEO\\Conditionals\\Conditional' not found in wp-content/plugins/wordpress-seo/src/conditionals/semrush-enabled-conditional.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\SEO\\Integrations\\Integration_Interface' not found in wp-content/plugins/wordpress-seo/src/integrations/watchers/indexable-permalink-watcher.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\WP\\SEO\\Presentations\\Indexable_Presentation' not found in wp-content/plugins/wordpress-seo/src/presentations/indexable-post-type-archive-presentation.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\SEO\\Integrations\\Integration_Interface' not found in wp-content/plugins/wordpress-seo/src/integrations/front-end/robots-txt-integration.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'YoastSEO_Vendor\\Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/wordpress-seo/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Yoast\\WP\\SEO\\Actions\\Importing\\Abstract_Aioseo_Importing_Action' not found in wp-content/plugins/wordpress-seo/src/actions/importing/deactivate-conflicting-plugins-action.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\SEO\\Conditionals\\Conditional' not found in wp-content/plugins/wordpress-seo/src/conditionals/admin/licenses-page-conditional.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSEO_Metabox_Tab' not found in wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-form-tab.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSEO_Admin_Asset_Location' not found in wp-content/plugins/wordpress-seo/admin/class-admin-asset-dev-server-location.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast\\WP\\SEO\\Integrations\\Integration_Interface' not found in wp-content/plugins/wordpress-seo/src/integrations/front-end/crawl-cleanup-rss.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

wordpress-seo/wp-seo.php 85% from 13 tests

"Yoast SEO" version 21.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-seo.php" instead of "wp-seo.php")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin76,590 lines of code in 1,236 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,03416,65557,94571,830
JavaScript892045444,240
SVG5101246
XSLT100145
CSS590061
XML10044
Markdown13024

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,655)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity11.79
▷ Minimum class complexity1.00
▷ Maximum class complexity2,655.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces117
Interfaces73
Traits20
Classes891
▷ Abstract classes333.70%
▷ Concrete classes85896.30%
▷ Final classes465.36%
Methods6,131
▷ Static methods66310.81%
▷ Public methods4,13967.51%
▷ Protected methods1,32221.56%
▷ Private methods67010.93%
Functions223
▷ Named functions6328.25%
▷ Anonymous functions16071.75%
Constants397
▷ Global constants153.78%
▷ Class constants38296.22%
▷ Public constants37197.12%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
38 compressed PNG files occupy 0.46MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/twitter_card.png15.76KB17.79KB0.00%
images/academy/wp_for_beginners.png10.37KB11.41KB0.00%
images/indexnow.png13.29KB15.23KB0.00%
images/support/support_forums.png16.22KB18.36KB0.00%
images/academy/understanding_structured_data.png4.13KB4.63KB0.00%