68% genuine-product-checker

Code Review | GenPro

WordPress plugin GenPro scored68%from 54 tests.

About plugin

  • Plugin page: genuine-product-c...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2019
  • Latest release: Nov 30, 2020
  • Number of updates: 20
  • Update frequency: every 19.9 days
  • Top authors: mishaiv (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,657 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.50ms] Passed 4 tests

An overview of server-side resources used by GenPro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.80 ▼2.22
Dashboard /wp-admin3.37 ▲0.0651.50 ▲0.36
Posts /wp-admin/edit.php3.42 ▲0.0648.24 ▼1.98
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.63 ▼14.16
Media Library /wp-admin/upload.php3.29 ▲0.0637.23 ▲2.84
Genpro settings /wp-admin/options-general.php?page=genpro3.2332.96

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 13 new options
New tables
wp_genpro_products
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
genpro_form_positive
widget_theysaidso_widget
genpro_option_name
genpro_serial_text
genpro_guar_text
genpro_formbtn_text
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for GenPro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.37 ▼0.442.01 ▼0.0143.44 ▼1.48
Dashboard /wp-admin2,205 ▲285.65 ▲0.06108.58 ▲19.1946.36 ▲4.27
Posts /wp-admin/edit.php2,116 ▲132.00 ▲0.0133.38 ▼2.0733.91 ▼2.55
Add New Post /wp-admin/post-new.php1,558 ▲2623.08 ▼0.03679.16 ▼51.1556.15 ▼0.91
Media Library /wp-admin/upload.php1,419 ▲164.17 ▼0.0297.77 ▼9.8848.99 ▼0.32
Genpro settings /wp-admin/options-general.php?page=genpro9292.0225.2932.34

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
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_genpro_products
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_recent-posts
    • widget_recent-comments
    • genpro_option_name
    • genpro_form_negative
    • genpro_container_id
    • genpro_formbtn_text
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • genpro_form_positive
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=genpro
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=genpro
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/genuine-product-checker/genpro.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: genuine, guarantee, genpro, product, woocommerce...

genuine-product-checker/genpro.php 92% from 13 tests

"GenPro" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("genuine-product-checker.php" instead of "genpro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected245 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP149242
CSS2002
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png42.70KB15.79KB▼ 63.03%
assets/screenshot-3.png15.61KB6.39KB▼ 59.09%
assets/screenshot-2.png28.62KB13.41KB▼ 53.14%
assets/icon-256x256.png38.29KB14.66KB▼ 61.70%
assets/screenshot-1.png50.01KB21.23KB▼ 57.54%