83% call-to-action-image-overlay-and-text

Code Review | Cta Image Overlay And Text

WordPress plugin Cta Image Overlay And Text scored83%from 54 tests.

About plugin

  • Plugin page: call-to-action-im...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-5.9.0
  • WordPress version: 6.3.1
  • First release: Feb 12, 2021
  • Latest release: May 12, 2022
  • Number of updates: 19
  • Update frequency: every 36.2 days
  • Top authors: haritpanchal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,000 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.78ms] Passed 4 tests

Analyzing server-side resources used by Cta Image Overlay And Text
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.12 ▼5.22
Dashboard /wp-admin3.32 ▲0.0146.59 ▼5.61
Posts /wp-admin/edit.php3.37 ▲0.0150.02 ▲1.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.89 ▲6.70
Media Library /wp-admin/upload.php3.24 ▲0.0135.06 ▼1.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cta Image Overlay And Text
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.48 ▲0.081.60 ▼0.2041.17 ▼4.63
Dashboard /wp-admin2,206 ▲185.86 ▲0.00111.11 ▲4.7641.27 ▼2.56
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0741.79 ▲7.1835.69 ▼0.96
Add New Post /wp-admin/post-new.php6,354 ▲4,82127.91 ▲4.90904.72 ▲176.6866.94 ▲9.33
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.01114.07 ▲14.2948.00 ▼2.94

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/call-to-action-image-overlay-and-text/cta-image-overlay-and-text.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: The official readme.txt is a good inspiration

call-to-action-image-overlay-and-text/cta-image-overlay-and-text.php 85% from 13 tests

"Cta Image Overlay And Text" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("call-to-action-image-overlay-and-text.php" instead of "cta-image-overlay-and-text.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin293 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript423101197
Sass27051
PHP251843
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
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

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.24MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png19.21KB6.86KB▼ 64.28%
screenshot-3.png19.72KB6.52KB▼ 66.93%
screenshot-1.png208.39KB92.01KB▼ 55.85%