89% wpseo-pinterest-rich-pins-for-woocommerce

Code Review | WPSEO Pinterest Rich Pins for WooCommerce

WordPress plugin WPSEO Pinterest Rich Pins for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wpseo-pinterest-r...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Feb 9, 2015
  • Latest release: Feb 10, 2022
  • Number of updates: 12
  • Update frequency: every 213.5 days
  • Top authors: jchristopher (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active /3,792 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Server-side resources used by WPSEO Pinterest Rich Pins for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.58 ▼9.58
Dashboard /wp-admin3.32 ▲0.0151.12 ▼6.73
Posts /wp-admin/edit.php3.37 ▲0.0147.00 ▼1.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.35 ▼4.31
Media Library /wp-admin/upload.php3.24 ▲0.0140.54 ▲6.36

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WPSEO Pinterest Rich Pins for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.511.68 ▼0.2542.99 ▲0.01
Dashboard /wp-admin2,198 ▲245.66 ▼0.0292.39 ▼1.4939.27 ▲1.02
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0440.82 ▲0.6235.72 ▼2.61
Add New Post /wp-admin/post-new.php1,537 ▲1118.30 ▼5.40655.59 ▼38.6883.70 ▲26.52
Media Library /wp-admin/upload.php1,403 ▲34.12 ▼0.02105.30 ▲3.4346.78 ▲0.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wpseo-pinterest-rich-pins-for-woocommerce/wpseo-pinterest-rich-pins-woocommerce.php 85% from 13 tests

The primary PHP file in "WPSEO Pinterest Rich Pins for WooCommerce" version 0.1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpseo-pinterest-rich-pins-for-woocommerce.php" instead of "wpseo-pinterest-rich-pins-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected190 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP256153138
Bourne Shell1171348
Markdown1304

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected