68% alley-business-toolkit

Code Review | Alley Business Toolkit

WordPress plugin Alley Business Toolkit scored68%from 54 tests.

About plugin

  • Plugin page: alley-business-to...
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 25, 2020
  • Latest release: Jul 6, 2023
  • Number of updates: 37
  • Update frequency: every 25.0 days
  • Top authors: alleythemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,565 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲0.96ms] Passed 4 tests

An overview of server-side resources used by Alley Business Toolkit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6037.44 ▼2.96
Dashboard /wp-admin3.90 ▲0.6046.57 ▼1.17
Posts /wp-admin/edit.php3.95 ▲0.6053.90 ▲6.91
Add New Post /wp-admin/post-new.php6.42 ▲0.5399.11 ▲11.14
Media Library /wp-admin/upload.php3.66 ▲0.4436.33 ▲1.07
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius4.0336.65

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 230 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
fs_active_plugins
widget_theysaidso_widget
fs_debug_mode
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Alley Business Toolkit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.26 ▼1.151.71 ▲0.0330.99 ▼14.09
Dashboard /wp-admin2,271 ▲835.84 ▼0.0196.64 ▼3.9984.53 ▲42.27
Posts /wp-admin/edit.php2,160 ▲712.14 ▲0.1538.30 ▲1.9535.82 ▼1.21
Add New Post /wp-admin/post-new.php1,568 ▲3623.08 ▼0.17679.08 ▲1.1150.86 ▼2.75
Media Library /wp-admin/upload.php1,456 ▲744.14 ▼0.1096.57 ▲0.3988.39 ▲45.72
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius1,0771.7123.4227.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/alley-business-toolkit/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • can_compress_scripts
    • fs_accounts
    • widget_theysaidso_widget
    • fs_active_plugins
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/alley-business-toolkit/admin/partials/alley-business-toolkit-admin-display.php
    • > /wp-content/plugins/alley-business-toolkit/public/partials/alley-business-toolkit-public-display.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/alley-business-toolkit/admin/partials/dashboard.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/alley-business-toolkit/admin/abt-widgets.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alley-business-toolkit/admin/partials/admin-notice.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/alley-business-toolkit/public/social-media.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function abt_fs() in wp-content/plugins/alley-business-toolkit/admin/functions.php:136
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alley-business-toolkit/admin/customizer/customizer.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alley-business-toolkit/admin/class-custom-posttype.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alley-business-toolkit/admin/metabox/save-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alley-business-toolkit/admin/metabox/add-metabox.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: business, promtions, services

alley-business-toolkit/alley-business-toolkit.php Passed 13 tests

The main PHP script in "Alley Business Toolkit" version 2.0.6 is automatically included on every request by WordPress
82 characters long description:
Alley Business Tootkit help you to create post types that needed for any business.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin34,897 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
PHP1388,26717,83434,097
CSS1699351
JavaScript54188220
Markdown1680214
JSON150015

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity76.83
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,311
▷ Static methods20115.33%
▷ Public methods91569.79%
▷ Protected methods171.30%
▷ Private methods37928.91%
Functions120
▷ Named functions120100.00%
▷ Anonymous functions00.00%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.18MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/images/logo.png0.37KB0.38KB0.00%
includes/demo-data/pro/3/screenshot.png112.34KB119.01KB0.00%
admin/images/abt_dashboad_image.png51.65KB54.33KB0.00%