84% denglu1

Code Review | denglu1

WordPress plugin denglu1 scored84%from 54 tests.

About plugin

  • Plugin page: denglu1
  • Plugin version: 1.0
  • PHP compatiblity: 7.4.15+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-5.7.1
  • WordPress version: 6.3.1
  • First release: May 31, 2021
  • Latest release: May 31, 2021
  • Number of updates: 3
  • Update frequency: every 7.0 days
  • Top authors: denglu1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.26ms] Passed 4 tests

This is a short check of server-side resources used by denglu1
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1144.62 ▲3.56
Dashboard /wp-admin3.46 ▲0.0847.39 ▼17.53
Posts /wp-admin/edit.php3.58 ▲0.1852.32 ▲0.94
Add New Post /wp-admin/post-new.php6.04 ▲0.1292.05 ▼17.64
Media Library /wp-admin/upload.php3.39 ▲0.1238.19 ▲1.19

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 28 new files
Database: 1 new table, 6 new options
New tables
wp_denglu1_login_log
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for denglu1
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6514.24 ▼0.152.00 ▲0.1748.65 ▲6.35
Dashboard /wp-admin2,208 ▲285.62 ▼0.0591.59 ▲5.9245.70 ▼1.41
Posts /wp-admin/edit.php2,116 ▲161.95 ▼0.0641.90 ▲3.1741.45 ▲3.84
Add New Post /wp-admin/post-new.php1,539 ▲1123.22 ▲0.17645.28 ▼40.9153.09 ▼0.78
Media Library /wp-admin/upload.php1,416 ▲164.26 ▲0.0594.52 ▼11.0443.83 ▼0.37

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/denglu1/View/Template/Denglu1SettingsPageTemplate.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/denglu1/View/Template/Denglu1LoginPageTemplate.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/denglu1/View/Template/Denglu1LogPageTemplate.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/denglu1/View/Template/Denglu1SettingsSectionTemplate.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/denglu1/Denglu1.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: easy, login, denglu1, security

denglu1/Denglu1.php 92% from 13 tests

The main PHP file in "denglu1" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("denglu1.php" instead of "Denglu1.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
Success! There were no dangerous files found in this plugin1,038 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP26726531,038

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.16
Average class complexity4.24
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods63
▷ Static methods63100.00%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin