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: 6.3.1
  • 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 / 588 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.91MB] [CPU: ▼32.40ms] Passed 4 tests

Server-side resources used by Single Post Meta Description
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.44 ▲0.24
Dashboard /wp-admin3.03 ▼0.2724.31 ▼22.19
Posts /wp-admin/edit.php3.03 ▼0.3323.03 ▼23.98
Add New Post /wp-admin/post-new.php3.03 ▼2.8622.20 ▼68.81
Media Library /wp-admin/upload.php3.03 ▼0.2022.16 ▼14.62
About /wp-admin/admin.php?page=credits_opzioni3.0323.74
@ S.P.M.D. /wp-admin/admin.php?page=single_post_meta_plugin_page3.0323.39

Server storage [IO: ▲0.03MB] [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: 8 new files
Database: no new tables, 7 new options
New WordPress options
single_post_meta_description_options_group
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Single Post Meta Description
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲12014.47 ▼0.222.36 ▲0.6442.33 ▲1.82
Dashboard /wp-admin2,228 ▲395.83 ▲0.90100.50 ▼11.3337.54 ▼5.38
Posts /wp-admin/edit.php2,111 ▲221.99 ▼0.0439.55 ▲4.5734.58 ▲4.16
Add New Post /wp-admin/post-new.php6,468 ▲4,94720.75 ▼2.45894.96 ▲228.2956.15 ▼5.43
Media Library /wp-admin/upload.php1,410 ▲224.20 ▼0.0499.22 ▼15.7846.42 ▼1.64
About /wp-admin/admin.php?page=credits_opzioni8092.0126.2830.54
@ S.P.M.D. /wp-admin/admin.php?page=single_post_meta_plugin_page8422.0223.4638.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric 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 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • single_post_meta_description_options_group

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please 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+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/single-post-meta-description/includes/single-post-meta-description-menu-options.php
    • > /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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | A shallow check that no browser errors were triggered
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
6 plugin tags: meta description, seo, search engine optimization, meta, google...

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

The primary PHP file in "Single Post Meta Description" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 212 characters long)
  • Domain Path: The domain path folder was not found ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%