84% acymailing-integration-for-business-directory

Code Review | Business directory integration - AcyMailing

WordPress plugin Business directory integration - AcyMailing scored84%from 54 tests.

About plugin

  • Plugin page: acymailing-integr...
  • Plugin version: 1.5
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Oct 24, 2023
  • Number of updates: 8
  • Update frequency: every 39.2 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /562 total downloads


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
Install script ran successfully

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

An overview of server-side resources used by Business directory integration - AcyMailing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.72 ▲2.31
Dashboard /wp-admin3.32 ▲0.0145.21 ▼1.25
Posts /wp-admin/edit.php3.37 ▲0.0141.97 ▼2.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.74 ▼13.36
Media Library /wp-admin/upload.php3.24 ▲0.0131.99 ▲1.63

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Business directory integration - AcyMailing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.37 ▲0.021.61 ▼0.1243.63 ▲3.47
Dashboard /wp-admin2,195 ▲305.63 ▲0.0594.12 ▲5.0641.52 ▼1.11
Posts /wp-admin/edit.php2,097 ▼32.00 ▼0.0035.05 ▼0.9834.26 ▼0.15
Add New Post /wp-admin/post-new.php1,526 ▼223.08 ▼0.05660.94 ▲9.2852.84 ▼11.11
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0196.23 ▲1.7340.74 ▼2.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/acymailing-integration-for-business-directory/acymailing-businessdirectory.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymPlugin' not found in wp-content/plugins/acymailing-integration-for-business-directory/plugin.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: business, integration, newsletter, acymailing

acymailing-integration-for-business-directory/acymailing-businessdirectory.php 92% from 13 tests

The main PHP script in "Business directory integration - AcyMailing" version 1.5 is automatically included on every request by WordPress
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 ("acymailing-integration-for-business-directory.php" instead of "acymailing-businessdirectory.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected560 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity37.50
▷ Minimum class complexity2.00
▷ Maximum class complexity73.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods18.33%
▷ Private methods00.00%
▷ Named functions375.00%
▷ Anonymous functions125.00%
▷ 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png14.08KB5.18KB▼ 63.22%