79% allback-samlab

Code Review | Сallback Samlab widget

WordPress plugin Сallback Samlab widget scored79%from 54 tests.

About plugin

  • Plugin page: allback-samlab
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2019
  • Latest release: Mar 1, 2019
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: samlab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /925 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.83MB] [CPU: ▼51.88ms] Passed 4 tests

A check of server-side resources used by Сallback Samlab widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.306.63 ▼37.06
Dashboard /wp-admin2.18 ▼1.168.78 ▼53.52
Posts /wp-admin/edit.php2.18 ▼1.178.59 ▼35.78
Add New Post /wp-admin/post-new.php2.18 ▼3.708.95 ▼81.14
Media Library /wp-admin/upload.php2.18 ▼1.049.66 ▼22.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: 1 new table, 6 new options
New tables
wp_callback
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Сallback Samlab widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.23 ▼1.171.68 ▼0.1539.09 ▼6.10
Dashboard /wp-admin2,222 ▲306.00 ▲1.0698.11 ▼14.3992.72 ▲50.47
Posts /wp-admin/edit.php2,108 ▲192.02 ▼0.0136.61 ▲2.3934.43 ▼1.50
Add New Post /wp-admin/post-new.php1,524 ▲423.80 ▲0.63577.86 ▼97.5448.65 ▼2.07
Media Library /wp-admin/upload.php1,401 ▲134.19 ▼0.0498.66 ▲1.1448.22 ▲5.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/allback-samlab/callback-settings.php+207
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Так виджет выглядит форма на сайте), #2 (Так виджет выглядит модуль в админке), #3 (Так виджет выглядит виджет в админке)
The official readme.txt is a good inspiration

allback-samlab/callback-settings.php 92% from 13 tests

"Сallback Samlab widget" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("allback-samlab.php" instead of "callback-settings.php")

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,480 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP3202232560
SVG201306
JavaScript6024227
CSS53021194
PO File15573119
JSON24045
Markdown19016
HTML10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/info.png1.89KB1.46KB▼ 22.37%
admin/assets/img/globe.png1.34KB1.42KB0.00%
admin/assets/img/icon.png0.37KB0.37KB0.00%