90% pangu-js

Code Review | Pangu JS

WordPress plugin Pangu JS scored90%from 54 tests.

About plugin

  • Plugin page: pangu-js
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.4
  • WordPress version: 6.3.1
  • First release: Nov 20, 2023
  • Latest release: Nov 20, 2023
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: shenyanzhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Pangu JS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.36 ▼2.36
Dashboard /wp-admin3.31 ▼0.0445.29 ▼9.75
Posts /wp-admin/edit.php3.36 ▲0.0042.85 ▼8.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.29 ▼6.69
Media Library /wp-admin/upload.php3.23 ▲0.0033.35 ▲2.33

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Pangu JS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲2314.60 ▲0.712.52 ▲0.6439.55 ▼4.76
Dashboard /wp-admin2,195 ▲245.61 ▼0.0490.99 ▼7.7440.40 ▲2.00
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0336.41 ▼3.9537.55 ▲1.55
Add New Post /wp-admin/post-new.php1,526 ▼523.37 ▲0.33648.62 ▲22.0253.20 ▼6.83
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.02106.20 ▲5.5346.01 ▲0.31

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: spacing, text, pangu, format

pangu-js/pangujs.php 92% from 13 tests

Analyzing the main PHP file in "Pangu JS" version 1.0.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pangu-js.php" instead of "pangujs.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
No dangerous file extensions were detected581 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript29555567
PHP14914

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.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin