94% acf-content-analysis-for-yoast-seo

Code Review | ACF Content Analysis for Yoast SEO

WordPress plugin ACF Content Analysis for Yoast SEO scored 94% from 54 tests.

About plugin

  • Plugin page: acf-content-analy...
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.8
  • WordPress version: 5.9.2
  • First release: Dec 17, 2015
  • Latest release: Jul 15, 2021
  • Number of updates: 36
  • Update frequency: every 56.6 days
  • Top authors: Yoast (44.44%)ViktorFroberg (38.89%)atimmer (13.89%)marol87 (8.33%)jipmoors (5.56%)

Code review

54 tests

User reviews

31 reviews

Install metrics

200,000+ active / 1,461,567 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼295.80ms] Passed 4 tests

A check of server-side resources used by ACF Content Analysis for Yoast SEO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1754.57 ▲4.41
Dashboard /wp-admin3.53 ▲0.1335.33 ▲0.80
Posts /wp-admin/edit.php3.76 ▲0.1237.75 ▼0.60
Add New Post /wp-admin/post-new.php6.99 ▲0.0292.86 ▼1,187.81
Media Library /wp-admin/upload.php3.41 ▲0.1127.68 ▲4.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 77 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by ACF Content Analysis for Yoast SEO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲6115.92 ▼0.115.92 ▲0.032.47 ▲0.10
Dashboard /wp-admin2,902 ▲446.10 ▼0.02119.38 ▼23.83156.76 ▼5.39
Posts /wp-admin/edit.php2,702 ▲83.25 ▲0.0262.31 ▼0.68139.35 ▼1.95
Add New Post /wp-admin/post-new.php1,759 ▲9820.95 ▲4.61449.58 ▲54.02157.62 ▲1.33
Media Library /wp-admin/upload.php1,711 ▲135.53 ▲0.07152.13 ▲2.17191.30 ▼1.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 take a closer look at the following
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast_ACF_Analysis_Dependency' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/Doubles/passing-dependency.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/Configuration/configuration-test.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/assets-test.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/Dependencies/acf-dependency-test.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast_ACF_Analysis_Dependency' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/Doubles/failing-dependency.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/main-test.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Yoast_ACF_Analysis_Dependency' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/inc/dependencies/dependency-yoast-seo.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/registry-test.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/requirements-test.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/acf-content-analysis-for-yoast-seo/tests/php/unit/Configuration/string-store-test.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: search engine optimization, advanced custom fields, acf, yoast, analysis...

acf-content-analysis-for-yoast-seo/yoast-acf-analysis.php 92% from 13 tests

"ACF Content Analysis for Yoast SEO" version 3.0.1'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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("acf-content-analysis-for-yoast-seo.php" instead of "yoast-acf-analysis.php")

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 detected3,757 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP334371,1312,004
JavaScript355962801,627
XML1284473
JSON20053

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes28.70%
Methods121
▷ Static methods64.96%
▷ Public methods10183.47%
▷ Protected methods1714.05%
▷ Private methods32.48%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected