84% cpo-shortcodes

Code Review | CPO Shortcodes

WordPress plugin CPO Shortcodes scored 84% from 54 tests.

About plugin

  • Plugin page: cpo-shortcodes
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 5.9.2
  • First release: Dec 7, 2013
  • Latest release: Nov 5, 2020
  • Number of updates: 45
  • Update frequency: every 56.1 days
  • Top authors: cpo_themes (37.78%)cpothemes (35.56%)machothemes (28.89%)wpchill (4.44%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active / 66,669 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.31MB] [CPU: ▼291.78ms] Passed 4 tests

A check of server-side resources used by CPO Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.3959.28 ▲8.49
Dashboard /wp-admin3.74 ▲0.3436.35 ▲2.38
Posts /wp-admin/edit.php3.97 ▲0.3341.05 ▲2.77
Add New Post /wp-admin/post-new.php7.21 ▲0.2497.07 ▼1,173.63
Media Library /wp-admin/upload.php3.62 ▲0.3327.81 ▲1.35
CPO Shortcodes /wp-admin/options-general.php?page=ctsc_settings3.5924.42

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 2 new options
New WordPress options
ctsc_install
ctsc_settings

Browser metrics Passed 4 tests

A check of browser resources used by CPO Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,798 ▲4416.26 ▲0.557.57 ▲1.332.37 ▲0.03
Dashboard /wp-admin2,905 ▲476.12 ▼0.10116.71 ▼18.30148.55 ▼11.64
Posts /wp-admin/edit.php2,701 ▲133.24 ▲0.0063.91 ▲0.12138.90 ▼6.40
Add New Post /wp-admin/post-new.php1,676 ▼4120.46 ▼0.69407.19 ▼36.21158.67 ▲0.52
Media Library /wp-admin/upload.php1,708 ▲135.46 ▼0.12154.93 ▲8.93188.60 ▲3.87
CPO Shortcodes /wp-admin/options-general.php?page=ctsc_settings9992.3754.03124.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • ctsc_settings
    • ctsc_install

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 30× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-testimonial.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-posts.php:113
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-team.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-button.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-dropcap.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-shortcodes/includes/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-map.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-definition.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-section.php:104
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cpo-shortcodes/shortcodes/shortcode-tabs.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: gallery, slideshow, counter, toggle, shortcode...

cpo-shortcodes/cpo-shortcodes.php 92% from 13 tests

"CPO Shortcodes" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 182 characters long)

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
No dangerous file extensions were detected4,814 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP313362281,767
JavaScript673541,653
SVG300826
CSS38787440
PO File15881,424128

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions73
▷ Named functions73100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon-shortcodes.png0.89KB0.97KB0.00%