78% wp-frontend-helper

Code Review | WP Frontend Helper

WordPress plugin WP Frontend Helper scored78%from 54 tests.

About plugin

  • Plugin page: wp-frontend-helper
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2019
  • Latest release: May 6, 2019
  • Number of updates: 14
  • Update frequency: every 6.4 days
  • Top authors: riccardooliva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /577 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.42ms] Passed 4 tests

Server-side resources used by WP Frontend Helper
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.68 ▼1.82
Dashboard /wp-admin3.52 ▲0.1850.71 ▼14.34
Posts /wp-admin/edit.php3.57 ▲0.2257.07 ▲7.01
Add New Post /wp-admin/post-new.php6.04 ▲0.1594.61 ▼10.53
Media Library /wp-admin/upload.php3.38 ▲0.1541.73 ▲5.03

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
wpfh_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Frontend Helper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.53 ▼1.241.58 ▼0.3041.64 ▼1.73
Dashboard /wp-admin2,206 ▲154.87 ▼0.07111.64 ▲5.8541.50 ▲0.68
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0540.56 ▼2.2734.82 ▼1.62
Add New Post /wp-admin/post-new.php1,514 ▼1517.47 ▼0.96671.42 ▲32.6061.62 ▲5.70
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0297.10 ▼8.2541.49 ▼3.57

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-frontend-helper/wpfh.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/Commands/test-MediaVersionBust.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/Assets/test-AssetsManager.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/Commands/test-EnableMediaVersion.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/Media/test-MediaPrinter.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/test-WpfhConfig.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/Media/test-MediaTag.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/Assets/test-AssetObserver.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-frontend-helper/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-frontend-helper/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WpfhTestCase' not found in wp-content/plugins/wp-frontend-helper/tests/src/test-WpfhOptions.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-frontend-helper === )
The official readme.txt is a good inspiration

wp-frontend-helper/wpfh.php 92% from 13 tests

This is the main PHP file of "WP Frontend Helper" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-frontend-helper.php" instead of "wpfh.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,382 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP333837251,291
Markdown113060
XML10030
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.62
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods123
▷ Static methods118.94%
▷ Public methods10988.62%
▷ Protected methods118.94%
▷ Private methods32.44%
Functions15
▷ Named functions213.33%
▷ Anonymous functions1386.67%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin