83% beonepage-lite

Code Review | BeOnePage Lite Plugin

WordPress plugin BeOnePage Lite Plugin scored 83% from 54 tests.

About plugin

  • Plugin page: beonepage-lite
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2017
  • Latest release: Aug 20, 2022
  • Number of updates: 7
  • Update frequency: every 272.1 days
  • Top authors: bethememe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 58,503 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.42ms] Passed 4 tests

Analyzing server-side resources used by BeOnePage Lite Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.83 ▼6.07
Dashboard /wp-admin3.42 ▲0.1250.25 ▲2.60
Posts /wp-admin/edit.php3.53 ▲0.1849.76 ▼1.72
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.09 ▼24.24
Media Library /wp-admin/upload.php3.34 ▲0.1136.39 ▲2.35
Portfolios /wp-admin/edit.php?post_type=portfolio3.3955.41
Add New /wp-admin/post-new.php?post_type=portfolio3.9956.72
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio3.3435.31

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 314 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

BeOnePage Lite Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲7613.66 ▼0.641.95 ▼0.4042.97 ▲1.08
Dashboard /wp-admin2,253 ▲654.87 ▼0.24106.45 ▼4.7439.28 ▼5.79
Posts /wp-admin/edit.php2,133 ▲442.05 ▲0.0137.01 ▼2.7831.44 ▼4.24
Add New Post /wp-admin/post-new.php1,549 ▲1623.22 ▲0.26641.67 ▼5.8256.24 ▼1.81
Media Library /wp-admin/upload.php1,432 ▲444.16 ▼0.10100.10 ▼11.8542.86 ▼3.63
Portfolios /wp-admin/edit.php?post_type=portfolio1,1051.9938.2732.22
Add New /wp-admin/post-new.php?post_type=portfolio2,4247.86195.4570.89
Portfolio Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tag&post_type=portfolio1,3032.3228.7428.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • 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
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beonepage-lite/beonepage-lite-plugin.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beonepage-lite/inc/custom-menu/menu-item-custom-field.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/beonepage-lite/demo-importer/theme-demo-import.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/beonepage-lite/inc/custom-menu/walker-nav-menu-edit.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CPT' not found in wp-content/plugins/beonepage-lite/inc/cpt/portfolio-post-type.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beonepage-lite/inc/cmb2/bootstrap.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beonepage-lite/inc/cmb2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beonepage-lite/inc/cmb2/init.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === beonepage-lite === )
You can take inspiration from this readme.txt

beonepage-lite/beonepage-lite-plugin.php 85% from 13 tests

The entry point to "BeOnePage Lite Plugin" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("beonepage-lite.php" instead of "beonepage-lite-plugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin39,045 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PO File11912,73116,32929,151
CSS71,0311,0324,072
PHP221,2032,6673,555
Sass11168231,116
JavaScript6202156814
Markdown21190337

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity34.53
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods235
▷ Static methods3012.77%
▷ Public methods22394.89%
▷ Protected methods93.83%
▷ Private methods31.28%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
inc/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
inc/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
inc/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%