89% imagebase642file

Code Review | ImageBase642File

WordPress plugin ImageBase642File scored89%from 54 tests.

About plugin

  • Plugin page: imagebase642file
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Jun 8, 2021
  • Latest release: Aug 3, 2022
  • Number of updates: 6
  • Update frequency: every 70.3 days
  • Top authors: donjajo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /609 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.64MB] [CPU: ▼17.44ms] Passed 4 tests

An overview of server-side resources used by ImageBase642File
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.37 ▼2.23
Dashboard /wp-admin3.35 ▲0.0449.13 ▼3.39
Posts /wp-admin/edit.php3.46 ▲0.1051.93 ▼0.83
Add New Post /wp-admin/post-new.php3.19 ▼2.6936.79 ▼62.79
Media Library /wp-admin/upload.php3.27 ▲0.0435.03 ▼1.35

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ImageBase642File
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.411.63 ▼0.0839.76 ▼7.26
Dashboard /wp-admin2,189 ▲125.49 ▼0.0982.06 ▼14.1439.62 ▼4.21
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0235.96 ▼1.4832.07 ▼6.06
Add New Post /wp-admin/post-new.php1,533 ▲723.01 ▼0.00656.21 ▲2.7956.38 ▲3.61
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.05100.65 ▼8.0048.00 ▲3.81

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: convert image, image, save_post

imagebase642file/imgb642file.php 85% from 13 tests

The principal PHP file in "ImageBase642File" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("imagebase642file.php" instead of "imgb642file.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected204 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36138204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.00
▷ Minimum class complexity4.00
▷ Maximum class complexity26.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods531.25%
▷ Protected methods00.00%
▷ Private methods1168.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected