93% squarecomm

Code Review | SquareComm

WordPress plugin SquareComm scored 93% from 54 tests.

About plugin

  • Plugin page: squarecomm
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 5.8.1
  • First release: Mar 31, 2016
  • Latest release: May 12, 2017
  • Number of updates: 34
  • Update frequency: every 12.0 days
  • Top authors: sssowner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 434 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼145.98ms] Passed 4 tests

Server-side resources used by SquareComm
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.30 ▲0.4645.54 ▲12.52
Dashboard /wp-admin3.58 ▲0.5352.85 ▲3.09
Posts /wp-admin/edit.php3.63 ▲0.5352.75 ▼2.80
Add New Post /wp-admin/post-new.php5.88 ▲0.44104.89 ▼584.64
Media Library /wp-admin/upload.php3.46 ▲0.4637.57 ▲0.43

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for SquareComm
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.98 ▲0.3910.84 ▲2.6857.49 ▲7.34
Dashboard /wp-admin2,970 ▲426.12 ▲0.19170.35 ▼33.45131.04 ▼1.83
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0280.88 ▲1.21104.40 ▼7.49
Add New Post /wp-admin/post-new.php1,683 ▲10217.99 ▲1.09439.99 ▼12.88149.30 ▲19.25
Media Library /wp-admin/upload.php1,810 ▲35.02 ▲0.02162.15 ▼38.39122.38 ▼18.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Notice
      Undefined index: request in wp-content/plugins/squarecomm/SquareStateAPI/sqss.php on line 37
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/image.php' (include_path='.:/usr/share/php') in wp-content/plugins/squarecomm/SquareCommAPI/file.php on line 28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === squarecomm === )
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can look at the official readme.txt

squarecomm/SquareComm-plugin.php 92% from 13 tests

"SquareComm" version 2.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("squarecomm.php" instead of "SquareComm-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,933 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP68338772,933

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity68.29
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity7.45
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes457.14%
▷ Concrete classes342.86%
▷ Final classes00.00%
Methods73
▷ Static methods00.00%
▷ Public methods3547.95%
▷ Protected methods1317.81%
▷ Private methods2534.25%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants45
▷ Global constants613.33%
▷ Class constants3986.67%
▷ Public constants39100.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
There were not PNG files found in your plugin