84% forge

Code Review | Forge - Front-End Page Builder

WordPress plugin Forge - Front-End Page Builder scored84%from 54 tests.

About plugin

  • Plugin page: forge
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Jan 30, 2019
  • Number of updates: 61
  • Update frequency: every 19.4 days
  • Top authors: cpothemes (90.16%)manuelvicedo (11.48%)

Code review

54 tests

User reviews

34 reviews

Install metrics

500+ active /63,678 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.37MB] [CPU: ▲3.65ms] 75% from 4 tests

This is a short check of server-side resources used by Forge - Front-End Page Builder
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 5,037.11ms on /wp-admin/admin.php?page=forge_extensions)
PageMemory (MB)CPU Time (ms)
Home /4.84 ▲1.3842.95 ▲6.28
Dashboard /wp-admin4.67 ▲1.3651.79 ▲4.16
Posts /wp-admin/edit.php4.78 ▲1.4253.97 ▲6.58
Add New Post /wp-admin/post-new.php7.28 ▲1.3989.57 ▼2.44
Media Library /wp-admin/upload.php4.59 ▲1.3644.16 ▲12.30
Templates /wp-admin/admin.php?page=forge_templates4.5740.79
Settings /wp-admin/admin.php?page=forge_settings4.5636.58
Extensions /wp-admin/admin.php?page=forge_extensions4.585,037.11
Forge /wp-admin/admin.php?page=forge_dashboard4.5737.72
Connections /wp-admin/admin.php?page=forge_connections4.6438.51

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 128 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_forge-template
forge_install
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
forge_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Forge - Front-End Page Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲7514.38 ▲0.031.55 ▼0.1740.36 ▲0.88
Dashboard /wp-admin2,267 ▲995.63 ▲0.0588.46 ▲3.9740.65 ▼7.49
Posts /wp-admin/edit.php2,177 ▲802.03 ▲0.0439.20 ▲2.8632.22 ▼0.45
Add New Post /wp-admin/post-new.php1,587 ▲5923.01 ▼0.03683.48 ▲2.8662.80 ▲2.94
Media Library /wp-admin/upload.php1,472 ▲694.22 ▲0.0395.69 ▼2.6546.47 ▲4.50
Templates /wp-admin/admin.php?page=forge_templates8742.0229.0526.62
Settings /wp-admin/admin.php?page=forge_settings8681.6926.3327.35
Extensions /wp-admin/admin.php?page=forge_extensions8362.0325.7326.50
Forge /wp-admin/admin.php?page=forge_dashboard9812.0524.5344.32
Connections /wp-admin/admin.php?page=forge_connections9371.6926.0724.71

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
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_forge-template
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • forge_install
    • widget_recent-comments
    • can_compress_scripts
    • forge_settings
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 44× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/forge/includes/class-forge-menu.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forge/includes/admin-settings.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/forge/elements/element-widget-comments.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/forge/elements/element-spacer.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forge/includes/metaboxes.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/forge/elements/element-woocommerce.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/forge/elements/element-text.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/forge/templates/template-builder.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forge/includes/class-forge-presets.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/forge/includes/update.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: There are too many tags (34 tag instead of maximum 10)
Please take inspiration from this readme.txt

forge/forge.php Passed 13 tests

The main PHP script in "Forge - Front-End Page Builder" version 1.4.6 is automatically included on every request by WordPress
48 characters long description:
A versatile, easy to use front end page builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin16,433 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP591,8901,1188,308
JavaScript109836793,930
SVG3001,944
PO File21,7433,5731,439
CSS7158168812

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity48.62
▷ Minimum class complexity5.00
▷ Maximum class complexity343.00
Average method complexity5.01
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods190
▷ Static methods42.11%
▷ Public methods17893.68%
▷ Protected methods10.53%
▷ Private methods115.79%
Functions171
▷ Named functions16898.25%
▷ Anonymous functions31.75%
Constants14
▷ Global constants14100.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
25 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/columns-wide.png0.26KB0.23KB▼ 9.92%
images/logo-medium.png1.97KB1.92KB▼ 2.53%
images/hooks/woocommerce.png0.89KB0.85KB▼ 4.41%
images/hooks/furnace.png3.34KB0.64KB▼ 80.84%
images/columns-narrow.png0.27KB0.23KB▼ 14.64%