78% cleverwise-contact-page

Code Review | Cleverwise Contact Page

WordPress plugin Cleverwise Contact Page scored78%from 54 tests.

About plugin

  • Plugin page: cleverwise-contac...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2014
  • Latest release: Mar 28, 2023
  • Number of updates: 38
  • Update frequency: every 84.6 days
  • Top authors: cyberws (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,491 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: ▼4.61ms] Passed 4 tests

Server-side resources used by Cleverwise Contact Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.40 ▼4.26
Dashboard /wp-admin3.31 ▲0.0153.82 ▲5.93
Posts /wp-admin/edit.php3.36 ▲0.0147.06 ▲2.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.51 ▼16.24
Media Library /wp-admin/upload.php3.23 ▲0.0033.47 ▲0.03
Contact Page /wp-admin/options-general.php?page=cw-contact-page3.1727.86

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
contact_page_version
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Cleverwise Contact Page
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.531.72 ▼0.0739.68 ▼0.78
Dashboard /wp-admin2,207 ▲185.79 ▲0.84101.49 ▼7.5038.33 ▼4.42
Posts /wp-admin/edit.php2,096 ▲72.05 ▼0.0035.78 ▼6.9134.92 ▼1.72
Add New Post /wp-admin/post-new.php1,517 ▼317.44 ▼5.74768.10 ▲169.1559.90 ▲11.35
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.0494.91 ▼3.9641.00 ▼3.71
Contact Page /wp-admin/options-general.php?page=cw-contact-page9372.0221.8349.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cw-contact-page
    • > Notice in wp-content/plugins/cleverwise-contact-page/cpa.php+630
    Trying to access array offset on value of type bool

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cleverwise-contact-page/index.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cleverwise-contact-page/cpa.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === cleverwise-contact-page === )
The official readme.txt is a good inspiration

cleverwise-contact-page/index.php 92% from 13 tests

The main PHP file in "Cleverwise Contact Page" ver. 2.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cleverwise-contact-page.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin999 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4174187999

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected