79% files-inspector

Code Review | Files Inspector

WordPress plugin Files Inspector scored79%from 54 tests.

About plugin

  • Plugin page: files-inspector
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2014
  • Latest release: Dec 16, 2014
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: alexhee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /975 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Files Inspector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.32 ▼2.21
Dashboard /wp-admin3.36 ▲0.0240.57 ▼25.01
Posts /wp-admin/edit.php3.48 ▲0.1247.31 ▲1.50
Add New Post /wp-admin/post-new.php5.94 ▲0.0680.74 ▼14.04
Media Library /wp-admin/upload.php3.29 ▲0.0632.71 ▼4.50
Files Inspector /wp-admin/options-general.php?page=files-inspector/filesinespector.php3.2952.48

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_filesinspector
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Files Inspector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.60 ▼0.751.62 ▼0.1740.03 ▼2.50
Dashboard /wp-admin2,215 ▲274.87 ▼0.01111.56 ▼3.1939.54 ▼5.80
Posts /wp-admin/edit.php2,095 ▲62.00 ▼0.0138.79 ▼1.2334.34 ▲0.91
Add New Post /wp-admin/post-new.php1,547 ▲2818.36 ▼4.84617.77 ▼63.7173.92 ▲17.65
Media Library /wp-admin/upload.php1,394 ▲94.22 ▲0.0294.04 ▼7.1540.94 ▼2.32
Files Inspector /wp-admin/options-general.php?page=files-inspector/filesinespector.php7832.0724.3728.26

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
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_filesinspector
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: security, files-inspector, file-compare, file, file-changes

files-inspector/filesinespector.php 85% from 13 tests

The principal PHP file in "Files Inspector" v. 0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("files-inspector.php" instead of "filesinespector.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected500 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP69984435
JavaScript17365

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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
There are no PNG files in this plugin