82% f12-profiler

Code Review | F12-Profiler

WordPress plugin F12-Profiler scored 82% from 54 tests.

About plugin

  • Plugin page: f12-profiler
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 5.8.1
  • First release: Feb 27, 2019
  • Latest release: Jan 24, 2022
  • Number of updates: 21
  • Update frequency: every 50.6 days
  • Top authors: forge12 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active / 30,010 total downloads

Benchmarks

Plugin footprint Passed 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.12MB] [CPU: ▼153.09ms] Passed 4 tests

Analyzing server-side resources used by F12-Profiler
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1225.81 ▼0.89
Dashboard /wp-admin3.19 ▲0.1239.60 ▼2.62
Posts /wp-admin/edit.php3.30 ▲0.1932.75 ▲0.46
Add New Post /wp-admin/post-new.php5.55 ▲0.1172.90 ▼608.24
Media Library /wp-admin/upload.php3.13 ▲0.1326.52 ▼0.59
F12-Profiler /wp-admin/tools.php?page=f12p3.1223.01

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by F12-Profiler
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲9715.67 ▼0.055.42 ▼0.3876.45 ▼1.48
Dashboard /wp-admin2,939 ▲476.10 ▼0.08117.32 ▼12.24167.30 ▼5.95
Posts /wp-admin/edit.php2,747 ▲43.24 ▲0.0063.13 ▼0.82139.87 ▲6.35
Add New Post /wp-admin/post-new.php3,812 ▲5318.13 ▲0.36443.50 ▲4.89157.11 ▼4.87
Media Library /wp-admin/upload.php1,756 ▲45.57 ▲0.07145.62 ▼2.54181.36 ▼4.16
F12-Profiler /wp-admin/tools.php?page=f12p1,2152.3653.38132.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
Please fix the following items
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/f12-profiler/includes/class.Helper.php
    • > /wp-content/plugins/f12-profiler/includes/class.TimeTracker.php
    • > /wp-content/plugins/f12-profiler/includes/class.FilterWrapper.php
    • > /wp-content/plugins/f12-profiler/includes/class.HardwareController.php
    • > /wp-content/plugins/f12-profiler/includes/class.AdminPage.php
    • > /wp-content/plugins/f12-profiler/f12-profiler.php
    • > /wp-content/plugins/f12-profiler/includes/class.Template.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/f12-profiler/templates/hardware.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/f12-profiler/templates/admin.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/tools.php?page=f12p
    • > Network (severe)
    wp-content/plugins/f12-profiler/assets/Forge12-Bildmarke.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please describe screenshot #1 in f12-profiler/assets to your readme.txt
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

f12-profiler/f12-profiler.php 92% from 13 tests

The primary PHP file in "F12-Profiler" version 1.3.8 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected11,725 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32,2192,23110,766
PHP10152348681
CSS35819278

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.40
Average class complexity12.14
▷ Minimum class complexity2.00
▷ Maximum class complexity25.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1232.43%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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