79% swellenterprise

Code Review | SWELLEnterprise

WordPress plugin SWELLEnterprise scored79%from 54 tests.

About plugin

  • Plugin page: swellenterprise
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2023
  • Latest release: Jan 6, 2023
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: DesignLoud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.93MB] [CPU: ▲1.58ms] Passed 4 tests

This is a short check of server-side resources used by SWELLEnterprise
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.27 ▲0.8048.62 ▲11.56
Dashboard /wp-admin4.28 ▲0.9358.48 ▼0.53
Posts /wp-admin/edit.php4.39 ▲1.0352.79 ▲5.08
Add New Post /wp-admin/post-new.php6.90 ▲1.0289.94 ▼9.78
Media Library /wp-admin/upload.php4.20 ▲0.9747.08 ▲13.00
SWELLEnterprise /wp-admin/options-general.php?page=swellenterprise4.1840.58

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SWELLEnterprise
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.50 ▼0.818.46 ▲6.8636.79 ▼7.95
Dashboard /wp-admin2,210 ▲195.90 ▲0.88112.36 ▲13.0241.68 ▼1.97
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0633.78 ▼1.4633.54 ▲0.03
Add New Post /wp-admin/post-new.php1,536 ▲1722.91 ▼0.30673.72 ▼2.6655.14 ▲3.14
Media Library /wp-admin/upload.php1,389 ▲44.22 ▼0.0294.26 ▼11.8643.26 ▼4.65
SWELLEnterprise /wp-admin/options-general.php?page=swellenterprise1,6039.62307.2288.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/swellenterprise/public/partials/swellenterprise-public-display.php
    • > /wp-content/plugins/swellenterprise/admin/partials/swellenterprise-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/swellenterprise/includes/class-swellenterprise-restapis.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were 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
5 plugin tags: sales, client management, project management, leads, crm

swellenterprise/swellenterprise.php Passed 13 tests

"SWELLEnterprise" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
A plugin that connects your website to the SWELLEnterprise services.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected38,117 lines of code in 495 files:
LanguageFilesBlank linesComment linesLines of code
JSON10015,622
JavaScript4201,5788,6817,913
PHP562,2782,3536,384
CSS15693045,525
SVG2002,672
Markdown1001

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.54
Average class complexity23.20
▷ Minimum class complexity1.00
▷ Maximum class complexity231.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods309
▷ Static methods3110.03%
▷ Public methods28291.26%
▷ Protected methods165.18%
▷ Private methods113.56%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants3
▷ Global constants3100.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
17 PNG files occupy 0.09MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/exopite-simple-options/assets/images/ui-icons_309bbf_256x240.png5.23KB4.11KB▼ 21.49%
admin/exopite-simple-options/assets/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
admin/exopite-simple-options/assets/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
admin/exopite-simple-options/assets/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
admin/exopite-simple-options/assets/images/ui-bg_glass_55_444444_1x400.png0.12KB0.16KB0.00%