84% show-fit-file

Code Review | Show Fit File

WordPress plugin Show Fit File scored84%from 54 tests.

About plugin

  • Plugin page: show-fit-file
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Jul 25, 2023
  • Number of updates: 22
  • Update frequency: every 47.7 days
  • Top authors: stuarttevendale (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,560 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▼0.92ms] Passed 4 tests

This is a short check of server-side resources used by Show Fit File
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.26 ▲0.8043.35 ▲3.90
Dashboard /wp-admin4.09 ▲0.7555.21 ▼6.81
Posts /wp-admin/edit.php4.20 ▲0.8555.27 ▲2.60
Add New Post /wp-admin/post-new.php6.68 ▲0.8090.12 ▼3.36
Media Library /wp-admin/upload.php4.01 ▲0.7945.30 ▲8.42

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Show Fit File
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9019.15 ▲4.8533.32 ▲30.7341.64 ▲0.27
Dashboard /wp-admin2,218 ▲184.88 ▼1.00115.23 ▲10.7942.64 ▲1.66
Posts /wp-admin/edit.php2,103 ▲62.01 ▼0.0036.22 ▼4.0534.82 ▼4.07
Add New Post /wp-admin/post-new.php6,463 ▲4,93731.61 ▲13.811,063.11 ▲395.9642.08 ▼24.14
Media Library /wp-admin/upload.php1,400 ▲34.29 ▲0.10120.51 ▼8.7645.03 ▼13.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/show-fit-file/showfitfile.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

show-fit-file/showfitfile.php 92% from 13 tests

The principal PHP file in "Show Fit File" v. 1.2.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-fit-file.php" instead of "showfitfile.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
There were no executable files found in this plugin54,823 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1264014550,756
PHP54103483,232
CSS58032698
JSON100137

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity179.50
▷ Minimum class complexity1.00
▷ Maximum class complexity358.00
Average method complexity10.41
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2475.00%
▷ Protected methods00.00%
▷ Private methods825.00%
Functions39
▷ Named functions3384.62%
▷ Anonymous functions615.38%
Constants4
▷ Global constants4100.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
13 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/images/marker-icon-2x.png2.41KB2.52KB0.00%
build/images/marker-shadow.a0c6cc14.png0.60KB1.16KB0.00%
styles/images/layers.png0.68KB1.05KB0.00%
build/images/marker-icon-2x-blue.69c430ad.png3.94KB2.53KB▼ 35.71%
styles/images/marker-shadow.png0.60KB1.16KB0.00%