93% glue-for-yoast-seo-amp

Code Review | Glue for Yoast SEO & AMP

WordPress plugin Glue for Yoast SEO & AMP scored 93% from 54 tests.

About plugin

  • Plugin page: glue-for-yoast-se...
  • Plugin version: 0.7
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4
  • WordPress version: 5.9.2
  • First release: Feb 24, 2016
  • Latest release: May 26, 2020
  • Number of updates: 22
  • Update frequency: every 70.7 days
  • Top authors: joostdevalk (36.36%)Yoast (31.82%)jipmoors (31.82%)ireneyoast (13.64%)

Code review

54 tests

User reviews

28 reviews

Install metrics

40,000+ active / 839,961 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼314.18ms] Passed 4 tests

Server-side resources used by Glue for Yoast SEO & AMP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.64 ▲3.53
Dashboard /wp-admin3.41 ▲0.0133.74 ▲1.25
Posts /wp-admin/edit.php3.65 ▲0.0139.96 ▲4.92
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.10 ▼1,257.15
Media Library /wp-admin/upload.php3.30 ▼0.0023.66 ▼4.33

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Glue for Yoast SEO & AMP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.89 ▼0.125.73 ▼0.762.34 ▼0.39
Dashboard /wp-admin2,895 ▲416.10 ▼0.07117.33 ▼18.79154.27 ▼11.34
Posts /wp-admin/edit.php2,688 ▼33.25 ▲0.0261.46 ▲0.41133.88 ▼7.18
Add New Post /wp-admin/post-new.php1,661 ▼016.40 ▼1.02396.85 ▼57.36152.24 ▼0.05
Media Library /wp-admin/upload.php1,701 ▼05.49 ▲0.03139.41 ▲4.56189.35 ▲0.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/glue-for-yoast-seo-amp/yoastseo-amp.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 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
2 plugin tags: seo, amp

glue-for-yoast-seo-amp/yoastseo-amp.php 77% from 13 tests

The primary PHP file in "Glue for Yoast SEO & AMP" version 0.7 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("glue-for-yoast-seo-amp.php" instead of "yoastseo-amp.php")
  • Domain Path: The domain path folder was not found ("/languages/")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
XML1213762
PHP163122

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected