79% cookielander

Code Review | Cookielander

WordPress plugin Cookielander scored79%from 54 tests.

About plugin

  • Plugin page: cookielander
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Oct 27, 2016
  • Number of updates: 9
  • Update frequency: every 35.3 days
  • Top authors: zaus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /991 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Cookielander
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.32 ▲2.56
Dashboard /wp-admin3.32 ▲0.0248.01 ▲1.60
Posts /wp-admin/edit.php3.37 ▲0.0241.92 ▼4.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.81 ▼14.18
Media Library /wp-admin/upload.php3.25 ▲0.0233.26 ▼9.52
Cookielander /wp-admin/options-general.php?page=cookielander3.2529.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Cookielander
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.63 ▼1.052.02 ▲0.3243.93 ▲2.02
Dashboard /wp-admin2,229 ▲415.35 ▲0.30128.16 ▲15.5953.21 ▲10.02
Posts /wp-admin/edit.php2,112 ▲202.48 ▲0.5038.35 ▼2.1335.20 ▲0.16
Add New Post /wp-admin/post-new.php1,537 ▲1823.54 ▲0.39673.13 ▲70.3855.85 ▼6.47
Media Library /wp-admin/upload.php1,414 ▲264.63 ▲0.4298.82 ▼10.6744.34 ▲0.55
Cookielander /wp-admin/options-general.php?page=cookielander9022.4749.3737.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=cookielander
    • > Notice in wp-content/plugins/cookielander/cookielander-options.php+119
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cookielander/cookielander.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cookielander/cookielander-ui.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: cookies, ppc, contact form, landing page, referral...

cookielander/cookielander.php Passed 13 tests

"Cookielander" version 0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Save referral variables to temporary storage (cookies, session, etc)

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
Everything looks great! No dangerous files found in this plugin608 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP312485383
JavaScript29189225

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.50
▷ Minimum class complexity9.00
▷ Maximum class complexity34.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2388.46%
▷ Protected methods311.54%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin