84% embedded-cdn

Code Review | CanadaHelps Embedded Donation Form

WordPress plugin CanadaHelps Embedded Donation Form scored84%from 54 tests.

About plugin

  • Plugin page: embedded-cdn
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2016
  • Latest release: Feb 23, 2023
  • Number of updates: 10
  • Update frequency: every 242.7 days
  • Top authors: konstantinr (90%)canadahelps (20%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,761 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: ▼0.24ms] Passed 4 tests

Server-side resources used by CanadaHelps Embedded Donation Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.01 ▲2.84
Dashboard /wp-admin3.31 ▲0.0145.12 ▼3.78
Posts /wp-admin/edit.php3.36 ▲0.0149.06 ▲3.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.97 ▼3.12
Media Library /wp-admin/upload.php3.23 ▲0.0036.00 ▲4.37

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CanadaHelps Embedded Donation Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.137.58 ▲5.9143.76 ▼1.48
Dashboard /wp-admin2,209 ▲245.83 ▼0.02101.98 ▲0.7439.32 ▼5.42
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0139.43 ▼0.8735.63 ▼5.06
Add New Post /wp-admin/post-new.php1,514 ▼1417.57 ▼0.66633.11 ▼16.0656.54 ▼3.82
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.1395.01 ▼6.8241.95 ▲0.44

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/embedded-cdn/embedded-cdn.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 ([embedcdn] shortcode) image not found
You can look at the official readme.txt

embedded-cdn/embedded-cdn.php Passed 13 tests

The entry point to "CanadaHelps Embedded Donation Form" version 1.0.0 is a PHP file that has certain tags in its header comment area
81 characters long description:
Adds a shortcode to support embedded custom donate now pages. [embedcdn id="168"]

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
Success! There were no dangerous files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121027

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.63KB11.23KB▼ 52.49%