84% wp-campaign-manager

Code Review | WP Campaign Manager

WordPress plugin WP Campaign Manager scored84%from 54 tests.

About plugin

  • Plugin page: wp-campaign-manager
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jul 22, 2013
  • Latest release: Dec 25, 2016
  • Number of updates: 35
  • Update frequency: every 35.8 days
  • Top authors: tomotomobile (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,149 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.32ms] Passed 4 tests

Server-side resources used by WP Campaign Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.68 ▼4.80
Dashboard /wp-admin3.37 ▲0.0750.49 ▼7.75
Posts /wp-admin/edit.php3.49 ▲0.1348.98 ▼3.90
Add New Post /wp-admin/post-new.php5.96 ▲0.0884.58 ▼8.83
Media Library /wp-admin/upload.php3.30 ▲0.0738.69 ▲1.70
All Campaigns /wp-admin/edit.php?post_type=wcm-campaign3.3437.23
Add New /wp-admin/post-new.php?post_type=wcm-campaign3.4252.23

Server storage [IO: ▲0.02MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Campaign Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.23 ▼0.951.66 ▼0.1341.94 ▼1.72
Dashboard /wp-admin2,236 ▲484.88 ▲0.02109.23 ▼9.8241.99 ▼3.03
Posts /wp-admin/edit.php2,116 ▲272.04 ▲0.0334.07 ▼3.2336.29 ▲3.11
Add New Post /wp-admin/post-new.php1,561 ▲4723.12 ▲5.45672.75 ▼22.0453.47 ▼1.43
Media Library /wp-admin/upload.php1,412 ▲244.18 ▼0.0497.68 ▼9.5442.40 ▼5.97
All Campaigns /wp-admin/edit.php?post_type=wcm-campaign1,1041.9331.5030.29
Add New /wp-admin/post-new.php?post_type=wcm-campaign2,4407.74178.0068.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/wp-campaign-manager/templates/meta-box.php on line 10
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/wp-campaign-manager/templates/meta-box.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/wp-campaign-manager/templates/meta-box.php:13
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/wp-campaign-manager/templates/meta-box.php on line 12
    • > PHP Notice
      Undefined variable: field_name in wp-content/plugins/wp-campaign-manager/templates/meta-box.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-campaign-manager/wp-campaign-manager.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
4 plugin tags: shortcode, campaign, post, marketing

wp-campaign-manager/wp-campaign-manager.php Passed 13 tests

The main file in "WP Campaign Manager" v. 0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
Manage your campaign banners easier.

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
There were no executable files found in this plugin247 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP555108202
PO File1161845

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin