84% cookies-for-leadhub

Code Review | Cookies for LeadHub

WordPress plugin Cookies for LeadHub scored 84% from 54 tests.

About plugin

  • Plugin page: cookies-for-leadhub
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2019
  • Latest release: Sep 17, 2020
  • Number of updates: 10
  • Update frequency: every 30.5 days
  • Top authors: nickanhem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.78ms] Passed 4 tests

This is a short check of server-side resources used by Cookies for LeadHub
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0624.56 ▼15.44
Dashboard /wp-admin3.32 ▲0.0246.17 ▼0.15
Posts /wp-admin/edit.php3.37 ▲0.0249.43 ▼1.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.57 ▼13.70
Media Library /wp-admin/upload.php3.24 ▲0.0233.95 ▼0.96

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cookies for LeadHub
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲8514.13 ▼0.6214.28 ▲12.1937.56 ▼2.79
Dashboard /wp-admin2,215 ▲274.84 ▼1.04110.60 ▲5.6841.81 ▼3.62
Posts /wp-admin/edit.php2,098 ▲122.02 ▼0.0244.60 ▲4.4339.36 ▲2.23
Add New Post /wp-admin/post-new.php1,536 ▼623.05 ▲4.91660.94 ▲50.7465.69 ▲10.92
Media Library /wp-admin/upload.php1,397 ▲64.25 ▲0.0995.31 ▼11.1446.84 ▲2.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cookies-for-leadhub/cookies-for-leadhub.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #2 (Made for developers), #3 (All about fields)
The official readme.txt might help

cookies-for-leadhub/cookies-for-leadhub.php Passed 13 tests

The primary PHP file in "Cookies for LeadHub" version 1.3.1 is used by WordPress to initiate all plugin functionality
127 characters long description:
When users access the website, the system will automatically save the first url to the COOKIE (applicable to LEADHUD software).

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 detected51 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP152234
JavaScript22117

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.58KB11.10KB▼ 46.04%