10% this-page-needs-files

Code Review | This page needs files

WordPress plugin This page needs files scored 10% from 53 tests.

About plugin

  • Plugin page: this-page-needs-f...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.2.2
  • WordPress version: 5.8.1
  • First release: Mar 6, 2015
  • Latest release: May 29, 2015
  • Number of updates: 35
  • Update frequency: every 2.4 days
  • Top authors: Sergejack (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

20+ active / 1,626 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/this-page-needs-files/this-page-needs-files.php+95
    Undefined index: tpnf-action-reactivate

Server metrics [RAM: ▼1.89MB] [CPU: ▼341.23ms] Passed 4 tests

Server-side resources used by This page needs files
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼0.987.71 ▼13.52
Dashboard /wp-admin1.76 ▼1.295.48 ▼34.96
Posts /wp-admin/edit.php1.76 ▼1.345.70 ▼33.99
Add New Post /wp-admin/post-new.php1.76 ▼3.674.46 ▼1,271.26
Media Library /wp-admin/upload.php1.76 ▼1.247.55 ▼24.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 4 new options
New WordPress options
BE_MCH_TPNF_MSG
BE_MCH_TPNF_WORKING
BE_MCH_TPNF_EMERGENCY
BE_MCH_TPNF_ACTIVATION

Browser metrics Passed 4 tests

This is an overview of browser requirements for This page needs files
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,695 ▲8915.95 ▲0.358.40 ▼0.2745.91 ▼0.64
Dashboard /wp-admin2,963 ▲1076.05 ▲0.24134.60 ▲0.1898.29 ▼8.16
Posts /wp-admin/edit.php2,710 ▲72.71 ▲0.0167.24 ▲1.7491.05 ▲0.22
Add New Post /wp-admin/post-new.php1,930 ▼10823.93 ▲4.63379.48 ▼1.53123.94 ▲12.92
Media Library /wp-admin/upload.php1,776 ▲45.07 ▼0.01144.90 ▼0.18113.12 ▼5.85

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/this-page-needs-files/this-page-needs-files.php+95
    Undefined index: tpnf-action-reactivate

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/this-page-needs-files/includes/vars.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'BE_MCH_TPNF_VARS' not found in wp-content/plugins/this-page-needs-files/includes/emergency.php:67

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
9 plugin tags: stylesheet, css, page, js, file...

this-page-needs-files/this-page-needs-files.php Passed 13 tests

The primary PHP file in "This page needs files" version 1.0.7 is used by WordPress to initiate all plugin functionality
102 characters long description:
Allow to include urls to javascript and css files inside the HTML header on a page/post specifc basis.

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
No dangerous file extensions were detected1,106 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1318697797
JavaScript26710259
CSS19250

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.18
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods21
▷ Static methods1361.90%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants2158.33%
▷ Class constants1541.67%
▷ Public constants15100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin