84% campaign-archive-block-for-mailchimp

Code Review | Campaign Archive Block for Mailchimp

WordPress plugin Campaign Archive Block for Mailchimp scored84%from 54 tests.

About plugin

  • Plugin page: campaign-archive-...
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 14, 2022
  • Latest release: Sep 24, 2023
  • Number of updates: 20
  • Update frequency: every 25.0 days
  • Top authors: Kau-Boy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /661 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.03MB] [CPU: ▼9.27ms] Passed 4 tests

Server-side resources used by Campaign Archive Block for Mailchimp
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.20 ▼8.87
Dashboard /wp-admin3.34 ▼0.0044.66 ▼17.67
Posts /wp-admin/edit.php3.39 ▲0.0448.20 ▲0.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0699.81 ▼10.65
Media Library /wp-admin/upload.php3.26 ▲0.0447.50 ▲9.04

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Campaign Archive Block for Mailchimp
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.20 ▼1.101.64 ▼0.3241.37 ▼5.11
Dashboard /wp-admin2,203 ▲125.99 ▲0.1196.87 ▼4.7039.42 ▼0.09
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.46 ▲0.2436.89 ▲0.61
Add New Post /wp-admin/post-new.php6,183 ▲4,63918.79 ▲0.66894.63 ▲291.6960.71 ▲1.73
Media Library /wp-admin/upload.php1,379 ▼94.22 ▼0.1194.87 ▼2.8247.13 ▲4.33

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CABFM\\add_action() in wp-content/plugins/campaign-archive-block-for-mailchimp/lib/load.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/campaign-archive-block-for-mailchimp/campaign-archive-block-for-mailchimp.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: mailchimp, archive, blocks, campaign, block

campaign-archive-block-for-mailchimp/campaign-archive-block-for-mailchimp.php Passed 13 tests

The main PHP script in "Campaign Archive Block for Mailchimp" version 2.2.0 is automatically included on every request by WordPress
56 characters long description:
Adds a block to show an archive for Mailchimp Campaigns.

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
No dangerous file extensions were detected1,360 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP162406461,018
JavaScript62828256
JSON20051
Sass28033
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.88
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods61
▷ Static methods2540.98%
▷ Public methods5996.72%
▷ Protected methods00.00%
▷ Private methods23.28%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin