89% cf7-conditional-load

Code Review | Conditionally Load CF7

WordPress plugin Conditionally Load CF7 scored89%from 54 tests.

About plugin

  • Plugin page: cf7-conditional-load
  • Plugin version: 1.0.40
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Nov 20, 2023
  • Number of updates: 48
  • Update frequency: every 27.8 days
  • Top authors: seezee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,864 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.91ms] Passed 4 tests

This is a short check of server-side resources used by Conditionally Load CF7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.62 ▼4.60
Dashboard /wp-admin3.42 ▲0.0850.54 ▼12.55
Posts /wp-admin/edit.php3.53 ▲0.1847.86 ▼1.48
Add New Post /wp-admin/post-new.php6.00 ▲0.1293.01 ▼4.99
Media Library /wp-admin/upload.php3.34 ▲0.1234.78 ▼0.20
Conditionally Load CF7 /wp-admin/options-general.php?page=cf7-conditional-load3.3135.74

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Conditionally Load CF7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.32 ▲0.031.87 ▲0.1540.37 ▼4.35
Dashboard /wp-admin2,199 ▲255.57 ▲0.0091.98 ▼2.7240.60 ▼7.49
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0140.95 ▼0.4835.79 ▲2.01
Add New Post /wp-admin/post-new.php6,231 ▲4,70525.81 ▲2.75861.40 ▲211.6360.71 ▲9.21
Media Library /wp-admin/upload.php1,407 ▲104.21 ▼0.0498.54 ▼6.0043.34 ▲0.61
Conditionally Load CF7 /wp-admin/options-general.php?page=cf7-conditional-load8731.9926.6430.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: scripts, javascript, styles, contact form 7, speed...

cf7-conditional-load/cf7-conditional-load.php 85% from 13 tests

The main file in "Conditionally Load CF7" v. 1.0.40 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 217 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected675 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6117313461
Markdown11090205
CSS2219

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity6.67
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.85MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/page-slug-1024x202.png26.91KB25.01KB▼ 7.07%
images/page-slug-768x152.png17.96KB16.43KB▼ 8.54%
(invalid) images/page-slug-586x116.png11.23KB0.00KB▼ 100.00%
images/meta-box-768x743.png117.08KB40.28KB▼ 65.60%
images/page-id-300x143.png7.76KB8.24KB0.00%