78% call-to-action-popup

Code Review | Call To Action Popup

WordPress plugin Call To Action Popup scored78%from 54 tests.

About plugin

  • Plugin page: call-to-action-popup
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2017
  • Latest release: Mar 16, 2019
  • Number of updates: 26
  • Update frequency: every 29.9 days
  • Top authors: lampd (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /4,073 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.13MB] [CPU: ▼10.36ms] Passed 4 tests

A check of server-side resources used by Call To Action Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.94 ▼7.26
Dashboard /wp-admin3.49 ▲0.1444.60 ▼14.91
Posts /wp-admin/edit.php3.53 ▲0.1846.94 ▲3.38
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.57 ▼12.26
Media Library /wp-admin/upload.php3.35 ▲0.1235.32 ▼7.01
Add New /wp-admin/post-new.php?post_type=ct_popup3.5747.70
Settings /wp-admin/edit.php?post_type=ct_popup&page=cactus-popup-settings3.3133.39
PopUps /wp-admin/edit.php?post_type=ct_popup3.3934.51

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Call To Action Popup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20113.71 ▼0.868.50 ▲6.7838.57 ▼4.91
Dashboard /wp-admin2,240 ▲525.87 ▲0.01104.07 ▼7.8877.43 ▲32.73
Posts /wp-admin/edit.php2,120 ▲312.03 ▼0.0338.56 ▲2.8635.88 ▲2.34
Add New Post /wp-admin/post-new.php1,553 ▲3417.55 ▼5.69695.48 ▲18.5150.04 ▼17.15
Media Library /wp-admin/upload.php1,422 ▲404.26 ▲0.1398.46 ▲2.9879.49 ▲32.19
Add New /wp-admin/post-new.php?post_type=ct_popup2,4447.46167.55112.80
Settings /wp-admin/edit.php?post_type=ct_popup&page=cactus-popup-settings9212.0726.5262.52
PopUps /wp-admin/edit.php?post_type=ct_popup1,0831.9534.9529.24

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/call-to-action-popup/includes/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/call-to-action-popup/includes/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/call-to-action-popup/includes/meta-box/inc/templates/video.php
    • > /wp-content/plugins/call-to-action-popup/includes/meta-box/inc/templates/media.php
  • 52× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/custom-html.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Object_Choice_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/post.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Walker_Base' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/walkers/input-list.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/wysiwyg.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Choice_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/select.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Multiple_Values_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/text-list.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Text_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/key-value.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/heading.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/multiple-values.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Taxonomy_Field' not found in wp-content/plugins/call-to-action-popup/includes/meta-box/inc/fields/taxonomy-advanced.php:11

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Donate link: Invalid url: ""
You can look at the official readme.txt

call-to-action-popup/cactus-popup.php 92% from 13 tests

"Call To Action Popup" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("call-to-action-popup.php" instead of "cactus-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin10,281 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PHP696902,4613,506
JavaScript829776403,334
CSS321161051,750
PO File146347091,681
Markdown19010

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.33
Average class complexity7.23
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes62
▷ Abstract classes711.29%
▷ Concrete classes5588.71%
▷ Final classes00.00%
Methods290
▷ Static methods23581.03%
▷ Public methods27494.48%
▷ Protected methods165.52%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/meta-box/img/jqueryui/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/meta-box/img/jqueryui/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%