88% dw-popup-card

Code Review | DW PopUp Card

WordPress plugin DW PopUp Card scored 88% from 54 tests.

About plugin

  • Plugin page: dw-popup-card
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.0
  • WordPress version: 5.9.2
  • First release: Dec 26, 2013
  • Latest release: Dec 26, 2013
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: designwall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 7,454 total downloads

Benchmarks

Plugin footprint Passed 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.05MB] [CPU: ▼295.75ms] Passed 4 tests

An overview of server-side resources used by DW PopUp Card
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1057.10 ▲8.26
Dashboard /wp-admin3.48 ▲0.0735.63 ▲3.24
Posts /wp-admin/edit.php3.72 ▲0.0736.40 ▼0.15
Add New Post /wp-admin/post-new.php6.96 ▼0.0293.70 ▼1,184.75
Media Library /wp-admin/upload.php3.37 ▲0.0723.19 ▼1.35
DW PopUp Card /wp-admin/options-general.php?page=dw-popup-card4.4532.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by DW PopUp Card
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,989 ▲26717.11 ▲1.5013.51 ▲7.552.67 ▼0.14
Dashboard /wp-admin2,914 ▲536.83 ▲0.67119.77 ▼15.86154.34 ▼8.54
Posts /wp-admin/edit.php2,716 ▲313.53 ▲0.1666.11 ▼3.40164.42 ▲14.07
Add New Post /wp-admin/post-new.php1,684 ▲2316.42 ▼0.28464.93 ▲52.38188.67 ▲35.12
Media Library /wp-admin/upload.php1,721 ▲236.05 ▲0.52114.60 ▼36.54182.58 ▲0.58
DW PopUp Card /wp-admin/options-general.php?page=dw-popup-card6,3309.62182.90204.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dw-popup-card
    • > Notice in wp-content/plugins/dw-popup-card/dw-popup-card-option.php+276
    Undefined property: stdClass::$regular

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/dw-popup-card/dw-popup-card.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dw-popup-card/dw-popup-card-option.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Back-end settings), #2 (E-card appearance), #3 (E-card opening)
You can take inspiration from this readme.txt

dw-popup-card/dw-popup-card.php Passed 13 tests

The main file in "DW PopUp Card" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
43 characters long description:
Custom pop up card for your Wordpress Site.

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,186 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP22511430
CSS185361
SVG100243
JavaScript42625152

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
8 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/close.png1.11KB0.21KB▼ 81.47%
assets/img/badge.png25.23KB9.04KB▼ 64.17%
assets/img/christmas-banner.png12.20KB5.08KB▼ 58.33%
assets/img/snow3q.png7.34KB2.65KB▼ 63.83%
assets/img/snow2l.png3.40KB1.68KB▼ 50.56%