78% clearbit

Code Review | Clearbit Reveal

WordPress plugin Clearbit Reveal scored78%from 54 tests.

About plugin

  • Plugin page: clearbit
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 21, 2023
  • Latest release: Oct 27, 2023
  • Number of updates: 16
  • Update frequency: every 11.9 days
  • Top authors: clearbit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /1,349 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
Installer ran successfully

Server metrics [RAM: ▼0.12MB] [CPU: ▼12.93ms] Passed 4 tests

Server-side resources used by Clearbit Reveal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0533.88 ▼4.08
Dashboard /wp-admin3.24 ▼0.0631.05 ▼22.16
Posts /wp-admin/edit.php3.31 ▼0.0535.73 ▼11.36
Add New Post /wp-admin/post-new.php5.48 ▼0.4067.46 ▼14.11
Media Library /wp-admin/upload.php3.25 ▲0.0234.16 ▲2.85
Clearbit Settings /wp-admin/options-general.php?page=clearbit-visitor-report3.1527.03

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
wvr-plugin-just-activated
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Clearbit Reveal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.23 ▼0.401.56 ▼0.0236.41 ▲0.39
Dashboard /wp-admin2,210 ▲335.65 ▲0.0380.07 ▼5.7473.89 ▲31.88
Posts /wp-admin/edit.php2,115 ▲151.96 ▼0.0435.37 ▼6.0434.11 ▼7.43
Add New Post /wp-admin/post-new.php1,563 ▲2818.32 ▲0.24688.77 ▲64.2456.68 ▼21.11
Media Library /wp-admin/upload.php1,418 ▲214.15 ▼0.05100.80 ▼0.3183.81 ▲39.69
Clearbit Settings /wp-admin/options-general.php?page=clearbit-visitor-report8102.0324.6629.80

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • wvr-plugin-just-activated
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=clearbit-visitor-report
    • > Notice in wp-content/plugins/clearbit/admin/class-clearbit-visitor-report-admin.php+41
    Undefined property: Clearbit_Visitor_Report_Admin::$clearbit_visitor_report
    • > GET request to /wp-admin/options-general.php?page=clearbit-visitor-report
    • > Notice in wp-content/plugins/clearbit/admin/partials/clearbit-visitor-report-admin-display.php+11
    Undefined index: key
    • > GET request to /wp-admin/options-general.php?page=clearbit-visitor-report
    • > Notice in wp-content/plugins/clearbit/admin/partials/clearbit-visitor-report-admin-display.php+23
    Undefined variable: success

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/clearbit/includes/class-clearbit-visitor-report-deactivator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/clearbit/public/partials/clearbit-visitor-report-public-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/clearbit/includes/class-clearbit-visitor-report-activator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/clearbit/admin/partials/clearbit-visitor-report-admin-display.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please describe screenshot #4 in clearbit/assets to your readme.txt
The official readme.txt is a good inspiration

clearbit/clearbit-visitor-report.php 85% from 13 tests

"Clearbit Reveal" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("clearbit.php" instead of "clearbit-visitor-report.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected277 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13111227277
CSS1040
JavaScript1100

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.16
Average class complexity2.38
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin