62% single-post-meta-description

Code Review | Single Post Meta Description

WordPress plugin Single Post Meta Description scored 62% from 54 tests.

About plugin

  • Plugin page: single-post-meta-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 5.9.2
  • First release: May 13, 2019
  • Latest release: Jun 6, 2019
  • Number of updates: 8
  • Update frequency: every 3.1 days
  • Top authors: viarete (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 412 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.22MB] [CPU: ▼339.55ms] Passed 4 tests

Server-side resources used by Single Post Meta Description
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0256.17 ▲7.63
Dashboard /wp-admin3.10 ▼0.3016.36 ▼18.49
Posts /wp-admin/edit.php3.10 ▼0.5339.82 ▼2.31
Add New Post /wp-admin/post-new.php3.10 ▼3.8717.16 ▼1,326.85
Media Library /wp-admin/upload.php3.10 ▼0.1914.92 ▼10.56
About /wp-admin/admin.php?page=credits_opzioni3.1017.38
@ S.P.M.D. /wp-admin/admin.php?page=single_post_meta_plugin_page3.1016.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
single_post_meta_description_options_group

Browser metrics Passed 4 tests

An overview of browser requirements for Single Post Meta Description
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲7115.84 ▲0.196.55 ▲0.782.69 ▼0.12
Dashboard /wp-admin2,925 ▲716.16 ▼0.01114.54 ▼15.60156.55 ▼8.04
Posts /wp-admin/edit.php2,724 ▲393.36 ▲0.1367.86 ▼1.75141.07 ▼11.78
Add New Post /wp-admin/post-new.php1,720 ▲917.55 ▼3.09462.15 ▲22.79187.25 ▲30.40
Media Library /wp-admin/upload.php1,733 ▲325.50 ▼0.00148.01 ▲6.22197.94 ▲13.37
About /wp-admin/admin.php?page=credits_opzioni1,0132.4994.22152.22
@ S.P.M.D. /wp-admin/admin.php?page=single_post_meta_plugin_page1,0692.5155.14224.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • single_post_meta_description_options_group

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=single_post_meta_plugin_page
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/admin.php?page=single_post_meta_plugin_page
    • > Warning in wp-content/plugins/single-post-meta-description/includes/single-post-meta-description-menu-options.php+144
    Illegal string offset 'single_post_meta_default_description_box'
    • > GET request to /wp-admin/admin.php?page=single_post_meta_plugin_page
    • > Notice in wp-content/plugins/single-post-meta-description/includes/single-post-meta-description-menu-options.php+144
    Uninitialized string offset: 0

SRP 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/single-post-meta-description/includes/single-post-meta-description-add-ajax-support.php
    • > /wp-content/plugins/single-post-meta-description/single-post-meta-description.php
    • > /wp-content/plugins/single-post-meta-description/includes/single-post-meta-description-menu-options.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/single-post-meta-description/includes/single-post-meta-description-meta-box.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: meta, seo, search engine optimization, keywords, google...

single-post-meta-description/single-post-meta-description.php 77% from 13 tests

The entry point to "Single Post Meta Description" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)
  • Domain Path: The domain path folder was not found ("/languages")

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 plugin216 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP458116183
JavaScript15119
CSS13514

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/viarete.png14.59KB5.16KB▼ 64.61%