67% polkadot-palette

Code Review | Polkadot Palette

WordPress plugin Polkadot Palette scored67%from 54 tests.

About plugin

  • Plugin page: polkadot-palette
  • Plugin version: 0.1
  • PHP compatiblity: 5.4.16+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 28, 2018
  • Latest release: Mar 31, 2018
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: httpioio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /643 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼3.02ms] Passed 4 tests

A check of server-side resources used by Polkadot Palette
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.72 ▲2.13
Dashboard /wp-admin3.52 ▲0.2144.94 ▼7.51
Posts /wp-admin/edit.php3.63 ▲0.2751.08 ▲3.28
Add New Post /wp-admin/post-new.php6.10 ▲0.2185.94 ▼9.96
Media Library /wp-admin/upload.php3.44 ▲0.2136.60 ▲4.24
Start analyzing pictures /wp-admin/admin.php?page=polkadot_palette_batch3.3832.67
Polkadot Palette /wp-admin/admin.php?page=polkadot_palette_admin3.4259.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: 2 new tables, 7 new options
New tables
polkadot_palette_doc_pic
polkadot_palette_pic
New WordPress options
theysaidso_admin_options
polkadot_palette
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Polkadot Palette
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,089 ▲33213.81 ▼0.5798.12 ▲96.0043.94 ▼2.78
Dashboard /wp-admin2,233 ▲455.90 ▲1.00102.62 ▼11.8138.92 ▼9.98
Posts /wp-admin/edit.php2,119 ▲302.01 ▲0.0038.42 ▲2.5935.35 ▼4.78
Add New Post /wp-admin/post-new.php1,536 ▲1717.78 ▼5.47687.69 ▼4.1756.77 ▲2.01
Media Library /wp-admin/upload.php1,415 ▲274.22 ▲0.03114.03 ▲10.2049.79 ▲4.79
Start analyzing pictures /wp-admin/admin.php?page=polkadot_palette_batch8022.0327.6732.18
Polkadot Palette /wp-admin/admin.php?page=polkadot_palette_admin1,0162.0622.4628.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/polkadot-palette/inc/Polkadot_palette_admin.class.php+166
    Undefined index: palette_color
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=polkadot_palette_batch
    • > Notice in wp-content/plugins/polkadot-palette/inc/Polkadot_palette_admin.class.php+166
    Undefined index: palette_color

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Polkadot_palette' not found in wp-content/plugins/polkadot-palette/inc/Polkadot_palette_template.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Polkadot_palette' not found in wp-content/plugins/polkadot-palette/inc/Polkadot_palette_admin.class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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:
  • Screenshots: Add images for these screenshots: #1 (Display Polkadot Palette in footer. You can change the width and the height.), #2 (Showcase mode shows pictures with the full screen to show pictures. You can add BGM.)
The official readme.txt might help

polkadot-palette/polkadot-palette.php 77% from 13 tests

The main PHP file in "Polkadot Palette" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: Please prefix the domain path with a forward slash character ("//")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/")

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 plugin1,182 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6158161713
JavaScript1331320
PO File140988
CSS20061

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.20
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods62
▷ Static methods58.06%
▷ Public methods4775.81%
▷ Protected methods00.00%
▷ Private methods1524.19%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected