83% captisa-forms-shortcode

Code Review | Captisa Forms Shortcode Plugin

WordPress plugin Captisa Forms Shortcode Plugin scored83%from 54 tests.

About plugin

  • Plugin page: captisa-forms-sho...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.5
  • WordPress version: 6.3.1
  • First release: Nov 7, 2019
  • Latest release: Aug 20, 2020
  • Number of updates: 18
  • Update frequency: every 16.0 days
  • Top authors: captisaforms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 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.01MB] [CPU: ▼7.00ms] Passed 4 tests

Server-side resources used by Captisa Forms Shortcode Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.65 ▲0.47
Dashboard /wp-admin3.31 ▲0.0148.04 ▼0.23
Posts /wp-admin/edit.php3.36 ▲0.0143.90 ▼6.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.49 ▼18.20
Media Library /wp-admin/upload.php3.23 ▲0.0033.46 ▼2.68

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Captisa Forms Shortcode Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.44 ▲0.061.71 ▲0.0343.46 ▲0.74
Dashboard /wp-admin2,206 ▲185.83 ▲0.7597.34 ▼6.3040.28 ▼3.17
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0332.88 ▼9.3937.09 ▲1.56
Add New Post /wp-admin/post-new.php1,514 ▼1917.52 ▼6.04682.41 ▲66.0750.05 ▼18.23
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.0594.05 ▼7.6344.03 ▼5.75

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/captisa-forms-shortcode/captisa.php:41

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Example of shortcode), #2 (Shortcode configuration), #3 (Where to get shortcode)
The official readme.txt might help

captisa-forms-shortcode/captisa.php 85% from 13 tests

This is the main PHP file of "Captisa Forms Shortcode Plugin" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("captisa-forms-shortcode.php" instead of "captisa.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18926

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.08
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.99KB7.85KB▼ 43.91%
screenshot-3.PNG77.01KB34.89KB▼ 54.70%
screenshot-2.PNG10.38KB6.05KB▼ 41.70%