83% rest-api-head-tags

Code Review | REST API - Head Tags

WordPress plugin REST API - Head Tags scored83%from 54 tests.

About plugin

  • Plugin page: rest-api-head-tags
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Jan 13, 2020
  • Latest release: Mar 26, 2021
  • Number of updates: 10
  • Update frequency: every 44.3 days
  • Top authors: frontity (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /15,888 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.06ms] Passed 4 tests

This is a short check of server-side resources used by REST API - Head Tags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0440.73 ▲2.14
Dashboard /wp-admin3.33 ▲0.0347.12 ▼0.80
Posts /wp-admin/edit.php3.38 ▲0.0346.81 ▲1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.11 ▼11.35
Media Library /wp-admin/upload.php3.25 ▲0.0333.70 ▼1.46
REST API - Head Tags /wp-admin/options-general.php?page=frontity-headtags3.2236.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by REST API - Head Tags
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.58 ▼1.001.85 ▲0.0142.93 ▼3.21
Dashboard /wp-admin2,210 ▲225.85 ▲0.9699.93 ▼13.0139.54 ▼3.71
Posts /wp-admin/edit.php2,090 ▲42.02 ▲0.0440.24 ▲1.5435.83 ▼1.89
Add New Post /wp-admin/post-new.php1,523 ▼1923.41 ▲5.14599.94 ▼48.3256.85 ▲4.05
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.1094.06 ▼6.9241.13 ▼5.15
REST API - Head Tags /wp-admin/options-general.php?page=frontity-headtags8962.9654.2778.04

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rest-api-head-tags/plugin.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Frontity_Plugin' not found in wp-content/plugins/rest-api-head-tags/class-frontity-headtags-plugin.php:13

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 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
8 plugin tags: tags, yoast, meta, seo, api...

rest-api-head-tags/plugin.php 77% from 13 tests

This is the main PHP file of "REST API - Head Tags" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("rest-api-head-tags.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin1,583 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2610830913
PHP11184591632
Markdown129031
JSON1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods73
▷ Static methods1216.44%
▷ Public methods6994.52%
▷ Protected methods00.00%
▷ Private methods45.48%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png5.76KB2.25KB▼ 61.00%
assets/banner-772x250.png6.93KB2.10KB▼ 69.67%
assets/banner-1544x500.png19.68KB4.17KB▼ 78.79%
assets/screenshot-2.png102.80KB31.94KB▼ 68.94%
assets/icon-128x128.png3.72KB1.75KB▼ 53.06%