78% pluglab

Code Review | Pluglab

WordPress plugin Pluglab scored78%from 54 tests.

About plugin

  • Plugin page: pluglab
  • Plugin version: 0.2.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 17, 2020
  • Latest release: Nov 19, 2022
  • Number of updates: 19
  • Update frequency: every 37.0 days
  • Top authors: unibirdtech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,828 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.71ms] Passed 4 tests

An overview of server-side resources used by Pluglab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.58 ▼0.18
Dashboard /wp-admin3.34 ▲0.0444.93 ▼2.31
Posts /wp-admin/edit.php3.46 ▲0.1044.06 ▼1.25
Add New Post /wp-admin/post-new.php5.93 ▲0.0475.56 ▼11.24
Media Library /wp-admin/upload.php3.27 ▲0.0435.35 ▼4.03

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 126 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pluglab
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼1.071.85 ▲0.0642.32 ▼1.36
Dashboard /wp-admin2,206 ▲215.85 ▼0.05111.35 ▲9.4843.79 ▼0.37
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0439.43 ▼2.0434.47 ▼3.38
Add New Post /wp-admin/post-new.php1,537 ▼13123.33 ▲1.21693.07 ▲65.3354.00 ▼1.35
Media Library /wp-admin/upload.php1,388 ▲64.24 ▲0.0397.55 ▼2.8643.71 ▲0.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pluglab/includes/customizer/iconsnew.php
    • > /wp-content/plugins/pluglab/includes/customizer/icons.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PL_Theme_Corposet_Layout' not found in wp-content/plugins/pluglab/includes/theme/corposet/class-pl-theme-corposet-load.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PL_Theme_Bizstrait_Layout' not found in wp-content/plugins/pluglab/includes/theme/bizstrait/class-pl-theme-bizstrait-load.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pluglab/includes/customizer/pl-help-functions.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pluglab/includes/theme/biznol/pl-default-functions.php:261
    • > PHP Fatal error
      Uncaught Error: Class 'PL_Theme_Shapro_Layout' not found in wp-content/plugins/pluglab/includes/theme/shapro/class-pl-theme-shapro-load.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PL_Theme_Biznol_Layout' not found in wp-content/plugins/pluglab/includes/theme/biznol/class-pl-theme-biznol-load.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pluglab/includes/theme/bizstrait/pl-default-functions.php:258
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pluglab/includes/theme/shapro/pl-default-functions.php:199
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pluglab/includes/theme/corposet/pl-default-functions.php:253

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: service, testimonial, header, callout, customizer...

pluglab/pluglab.php 92% from 13 tests

This is the main PHP file of "Pluglab" version 0.2.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected42,641 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP531,6232,09016,531
SVG401210,130
CSS153,227949,789
JavaScript121,5876366,191

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.47
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods309
▷ Static methods185.83%
▷ Public methods29294.50%
▷ Protected methods10.32%
▷ Private methods165.18%
Functions215
▷ Named functions6630.70%
▷ Anonymous functions14969.30%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/circle.png29.02KB4.83KB▼ 83.36%
assets/images/circle2.png29.00KB4.77KB▼ 83.56%
assets/images/signature.png2.00KB2.04KB0.00%
assets/images/circle1.png30.31KB5.09KB▼ 83.20%