84% cf7-save-my-leads

Code Review | Post and Page Views Counter

WordPress plugin Post and Page Views Counter scored84%from 54 tests.

About plugin

  • Plugin page: cf7-save-my-leads
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: May 17, 2017
  • Latest release: Sep 8, 2017
  • Number of updates: 24
  • Update frequency: every 5.1 days
  • Top authors: yechielby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Post and Page Views Counter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.26 ▼0.58
Dashboard /wp-admin3.31 ▲0.0047.39 ▼5.72
Posts /wp-admin/edit.php3.36 ▲0.0053.94 ▲5.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.33 ▼10.68
Media Library /wp-admin/upload.php3.23 ▲0.0038.83 ▲1.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Post and Page Views Counter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.29 ▼1.092.18 ▼1.0343.98 ▲1.83
Dashboard /wp-admin2,224 ▲185.86 ▲0.9698.13 ▼5.2441.15 ▼5.17
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0241.12 ▲3.7536.10 ▲3.25
Add New Post /wp-admin/post-new.php1,550 ▲1023.25 ▲4.77669.18 ▲21.4257.77 ▲8.34
Media Library /wp-admin/upload.php1,403 ▲64.25 ▲0.0295.97 ▼17.1746.09 ▼1.01

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cf7-save-my-leads/includes/columns.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-my-leads/wp-contact-form-7-save-my-leads.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-my-leads/includes/bubble.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/cf7-save-my-leads/includes/csv.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-my-leads/includes/init.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cf7-save-my-leads/includes/filters.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-my-leads/includes/metabox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-my-leads/includes/save.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

cf7-save-my-leads/wp-contact-form-7-save-my-leads.php 92% from 13 tests

Analyzing the main PHP file in "Post and Page Views Counter" version 1.0.3
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cf7-save-my-leads.php" instead of "wp-contact-form-7-save-my-leads.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
Success! There were no dangerous files found in this plugin591 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP810739589
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/img/bosonet-logo.png4.84KB3.22KB▼ 33.42%