84% rich-snippets-enhancement-with-rank-math

Code Review | Rich Snippets Enhancement For Woocommerce and Rank Math

WordPress plugin Rich Snippets Enhancement For Woocommerce and Rank Math scored 84% from 54 tests.

About plugin

  • Plugin page: rich-snippets-enh...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2020
  • Latest release: Oct 21, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: yahiaashraf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,750 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.69ms] Passed 4 tests

Server-side resources used by Rich Snippets Enhancement For Woocommerce and Rank Math
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.23 ▲2.38
Dashboard /wp-admin3.31 ▲0.0145.31 ▼0.31
Posts /wp-admin/edit.php3.36 ▲0.0144.72 ▼2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.93 ▲7.02
Media Library /wp-admin/upload.php3.24 ▲0.0136.60 ▲2.75

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Rich Snippets Enhancement For Woocommerce and Rank Math
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.131.67 ▼0.0941.12 ▼5.53
Dashboard /wp-admin2,207 ▲164.85 ▼1.05114.97 ▲7.4942.52 ▼9.02
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.74 ▼0.5037.67 ▲6.38
Add New Post /wp-admin/post-new.php1,546 ▲1318.37 ▼4.95644.52 ▼77.3853.80 ▲5.30
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.04110.99 ▲12.3646.93 ▼0.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/rich-snippets-enhancement-with-rank-math/rankmathschema.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/rich-snippets-enhancement-with-rank-math/rankmathschema.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rich-snippets-enhancement-with-rank-math/rankmathschema.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
You can look at the official readme.txt

rich-snippets-enhancement-with-rank-math/rankmathschema.php 92% from 13 tests

"Rich Snippets Enhancement For Woocommerce and Rank Math" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rich-snippets-enhancement-with-rank-math.php" instead of "rankmathschema.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
Good job! No executable or dangerous file extensions detected111 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
XML40079
PHP151032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin