94% forefront-div

Code Review | Forefront Div

WordPress plugin Forefront Div scored 94% from 54 tests.

About plugin

  • Plugin page: forefront-div
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 5.9.2
  • First release: May 5, 2016
  • Latest release: Jul 23, 2016
  • Number of updates: 9
  • Update frequency: every 38.0 days
  • Top authors: PluginlySpeaking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 651 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.43MB] [CPU: ▼288.94ms] Passed 4 tests

This is a short check of server-side resources used by Forefront Div
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.4754.80 ▲3.32
Dashboard /wp-admin3.84 ▲0.4338.24 ▲4.83
Posts /wp-admin/edit.php4.07 ▲0.4240.36 ▲3.76
Add New Post /wp-admin/post-new.php7.37 ▲0.3997.87 ▼1,167.17
Media Library /wp-admin/upload.php3.78 ▲0.4828.14 ▲4.32
Forefront Div /wp-admin/edit.php?post_type=forefront_div_ps3.8331.46
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.7826.32
Add New /wp-admin/post-new.php?post_type=forefront_div_ps3.9939.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Forefront Div
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,985 ▲26316.18 ▲0.4012.03 ▲6.3216.93 ▲14.28
Dashboard /wp-admin2,971 ▲1136.15 ▼0.03120.11 ▼12.56172.49 ▲9.84
Posts /wp-admin/edit.php2,771 ▲803.26 ▲0.0364.08 ▼0.29158.97 ▲15.16
Add New Post /wp-admin/post-new.php1,831 ▲12121.91 ▲1.31466.23 ▲39.09209.98 ▲48.97
Media Library /wp-admin/upload.php1,781 ▲805.58 ▲0.07162.10 ▲15.62255.44 ▲68.30
Forefront Div /wp-admin/edit.php?post_type=forefront_div_ps1,4623.1762.21132.36
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,2762.4553.68124.31
Add New /wp-admin/post-new.php?post_type=forefront_div_ps1,9474.07101.45145.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/forefront-div/class-tgm-plugin-activation.php:1883
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/forefront-div/class-tgm-plugin-activation.php:1883

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: front, above, modal, scrolling, div...

forefront-div/pluginlyspeaking-forefrontdiv.php 92% from 13 tests

"Forefront Div" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("forefront-div.php" instead of "pluginlyspeaking-forefrontdiv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,385 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25121,4481,966
JavaScript18221394
CSS13025

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity44.14
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods94
▷ Static methods55.32%
▷ Public methods7478.72%
▷ Protected methods2021.28%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/disabled.png0.57KB0.67KB0.00%
img/closable.png1.28KB1.24KB▼ 2.90%