84% sloth-logo-customizer

Code Review | Sloth Logo Customizer

WordPress plugin Sloth Logo Customizer scored 84% from 54 tests.

About plugin

  • Plugin page: sloth-logo-custom...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.4-5.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Apr 2, 2020
  • Number of updates: 19
  • Update frequency: every 53.2 days
  • Top authors: ammar.shahraki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.19ms] Passed 4 tests

Server-side resources used by Sloth Logo Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.54 ▼1.81
Dashboard /wp-admin3.32 ▲0.0247.83 ▼3.03
Posts /wp-admin/edit.php3.37 ▲0.0148.80 ▼1.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.66 ▼6.50
Media Library /wp-admin/upload.php3.24 ▲0.0140.64 ▲7.64
Login Logo /wp-admin/themes.php?page=slothLogo3.2757.28

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Sloth Logo Customizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.60 ▼0.781.87 ▲0.2341.53 ▼5.79
Dashboard /wp-admin2,213 ▲284.85 ▼0.07102.91 ▼10.2137.97 ▼4.43
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0840.87 ▲0.3537.08 ▲2.00
Add New Post /wp-admin/post-new.php1,536 ▲323.29 ▲0.13598.33 ▼162.4453.62 ▼22.60
Media Library /wp-admin/upload.php1,389 ▲74.19 ▲0.0197.47 ▼3.7539.90 ▼2.98
Login Logo /wp-admin/themes.php?page=slothLogo1,0323.0757.8946.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sloth-logo-customizer/network-setting.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sloth-logo-customizer/setting.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/sloth-logo-customizer/sloth-options.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: info widget, login, logo, support url, login page...

sloth-logo-customizer/sloth-logo-customizer.php 92% from 13 tests

The main PHP file in "Sloth Logo Customizer" ver. 2.0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

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
Good job! No executable or dangerous file extensions detected444 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP48181404
PO File1131940

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity21.50
▷ Minimum class complexity15.00
▷ Maximum class complexity28.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
wordpress-logo.png5.40KB4.01KB▼ 25.67%