10% beni-demo

Code Review | Beni Demo

WordPress plugin Beni Demo scored10%from 54 tests.

About plugin

  • Plugin page: beni-demo
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 23, 2022
  • Latest release: Jan 28, 2023
  • Number of updates: 5
  • Update frequency: every 7.4 days
  • Top authors: mobeenraheem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /714 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.26ms] Passed 4 tests

A check of server-side resources used by Beni Demo
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.83 ▼6.43
Dashboard /wp-admin3.32 ▲0.0249.28 ▲0.26
Posts /wp-admin/edit.php3.38 ▲0.0248.07 ▲2.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.77 ▲5.20
Media Library /wp-admin/upload.php3.24 ▲0.0234.78 ▼5.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
new_site_activate
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Beni Demo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,748 ▲1313.12 ▼1.171.86 ▲0.098.78 ▼36.92
Dashboard /wp-admin2,209 ▲245.86 ▲0.01100.60 ▼11.3841.81 ▼0.73
Posts /wp-admin/edit.php2,098 ▲92.00 ▼0.0135.07 ▲0.3033.70 ▼3.22
Add New Post /wp-admin/post-new.php1,542 ▲2318.31 ▼4.66608.99 ▼63.1065.01 ▲5.03
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0198.49 ▼1.2142.62 ▼2.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • new_site_activate
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/beni-demo/beni-demo.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/beni-demo/inc/portico/widgets/widget.php:22

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

beni-demo/beni-demo.php Passed 13 tests

The main file in "Beni Demo" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
108 characters long description:
Beni Demo creates necessary pages & serves as a demo importer of images & widgets for MobeenRaheem's themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin159 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42131159

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity14.00
▷ Minimum method complexity14.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/portico/images/brand4.png2.68KB2.65KB▼ 1.24%
inc/portico/images/brand2.png2.93KB2.94KB0.00%
inc/portico/images/brand1.png2.38KB2.37KB0.37%
inc/portico/images/brand3.png3.31KB3.27KB▼ 1.21%