84% post-call-to-action

Code Review | Post Call to Action

WordPress plugin Post Call to Action scored84%from 54 tests.

About plugin

  • Plugin page: post-call-to-action
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Dec 16, 2018
  • Number of updates: 16
  • Update frequency: every 95.3 days
  • Top authors: srumery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,929 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.81ms] Passed 4 tests

A check of server-side resources used by Post Call to Action
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.61 ▼1.96
Dashboard /wp-admin3.37 ▲0.0644.30 ▼3.29
Posts /wp-admin/edit.php3.42 ▲0.0648.54 ▼0.79
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.69 ▼1.21
Media Library /wp-admin/upload.php3.29 ▲0.0636.49 ▲2.82
Post Call to Action /wp-admin/options-general.php?page=rum-post-cta3.2630.11

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
rum_post_cta_plugin_options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Post Call to Action
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.58 ▼1.011.67 ▲0.0842.25 ▲0.81
Dashboard /wp-admin2,229 ▲415.00 ▼0.88102.69 ▼12.4040.61 ▼3.10
Posts /wp-admin/edit.php2,114 ▲282.47 ▲0.4640.22 ▲0.0634.81 ▲0.37
Add New Post /wp-admin/post-new.php1,531 ▲1717.87 ▲0.02671.39 ▼9.0836.09 ▼15.79
Media Library /wp-admin/upload.php1,405 ▲174.44 ▲0.21102.86 ▲6.9943.16 ▲2.79
Post Call to Action /wp-admin/options-general.php?page=rum-post-cta1,2742.4449.2225.65

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 detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-call-to-action/includes/settings.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-call-to-action/includes/display.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/post-call-to-action/post-call-to-action.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-call-to-action/includes/metabox.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (Call to action bar) image not found
You can look at the official readme.txt

post-call-to-action/post-call-to-action.php Passed 13 tests

"Post Call to Action" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
82 characters long description:
Every page should do something. Display a call to action bar below each blog post.

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 plugin506 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6237130388
CSS100107
JavaScript11911

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.30MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png109.15KB41.13KB▼ 62.32%
screenshot-1.png53.85KB21.30KB▼ 60.44%
screenshot-3.png142.16KB44.66KB▼ 68.58%