73% file-relative-path

Code Review | File Relative Path

WordPress plugin File Relative Path scored73%from 54 tests.

About plugin

  • Plugin page: file-relative-path
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Jan 24, 2020
  • Latest release: Jan 27, 2020
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: leandrokeenecmanalon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /687 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.69ms] Passed 4 tests

Analyzing server-side resources used by File Relative Path
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.89 ▼9.86
Dashboard /wp-admin3.36 ▲0.0246.21 ▼16.00
Posts /wp-admin/edit.php3.48 ▲0.1247.35 ▼3.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.65 ▼5.70
Media Library /wp-admin/upload.php3.29 ▲0.0637.04 ▲3.88
File Relative Path /wp-admin/tools.php?page=file-relative-path3.2829.13

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 10 new options
New WordPress options
frp_images
theysaidso_admin_options
frp_video
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
frp_iframe
frp_audio
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for File Relative Path
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.72 ▲0.451.72 ▲0.0137.00 ▼4.33
Dashboard /wp-admin2,199 ▲225.59 ▼0.0285.70 ▼3.9638.14 ▲0.03
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0639.39 ▼1.7435.78 ▲4.87
Add New Post /wp-admin/post-new.php1,529 ▼622.99 ▲4.86622.63 ▼13.3756.09 ▼44.54
Media Library /wp-admin/upload.php1,404 ▲14.14 ▼0.0998.28 ▼10.2345.33 ▼24.25
File Relative Path /wp-admin/tools.php?page=file-relative-path8522.0023.2133.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'frp_uninstallation' not found or invalid function name
  • This plugin does not fully uninstall, leaving 10 options in the database
    • frp_images
    • db_upgraded
    • frp_video
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • frp_audio
    • frp_iframe

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/file-relative-path/admin/inc/frp-header.php
    • > /wp-content/plugins/file-relative-path/function/server-host.php
    • > /wp-content/plugins/file-relative-path/admin/inc/frp-support.php
    • > /wp-content/plugins/file-relative-path/admin/main.php
    • > /wp-content/plugins/file-relative-path/admin/inc/frp-uninstallation.php
    • > /wp-content/plugins/file-relative-path/admin/inc/frp-settings.php
    • > /wp-content/plugins/file-relative-path/admin/define.php
    • > /wp-content/plugins/file-relative-path/admin/inc/frp-how-it-works.php
    • > /wp-content/plugins/file-relative-path/file-relative-path.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (screenshot-5.jpg) image not found
You can take inspiration from this readme.txt

file-relative-path/file-relative-path.php 85% from 13 tests

Analyzing the main PHP file in "File Relative Path" version 1.0
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)
  • Git Repository: An alternative Git repository was detected

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
There were no executable files found in this plugin430 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP919880409
CSS16621

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
PNG images were not found in this plugin