84% wp-popover

Code Review | WP Popover

WordPress plugin WP Popover scored84%from 54 tests.

About plugin

  • Plugin page: wp-popover
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2018
  • Latest release: Apr 26, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: naminbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,080 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.58ms] Passed 4 tests

An overview of server-side resources used by WP Popover
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.90 ▼3.46
Dashboard /wp-admin3.38 ▲0.0844.20 ▼4.18
Posts /wp-admin/edit.php3.50 ▲0.1447.63 ▲1.66
Add New Post /wp-admin/post-new.php5.98 ▲0.1089.94 ▼0.34
Media Library /wp-admin/upload.php3.31 ▲0.0837.37 ▲2.89
Add New /wp-admin/post-new.php?post_type=wpob-popover3.4345.94
Setting /wp-admin/edit.php?post_type=wpob-popover&page=global_settings3.2833.37
How to Use /wp-admin/edit.php?post_type=wpob-popover&page=how_to_use3.2831.29
WP Popover /wp-admin/edit.php?post_type=wpob-popover3.3536.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
wpobp_global_settings
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Popover
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲21113.74 ▼0.8911.36 ▲9.6138.75 ▼2.74
Dashboard /wp-admin2,257 ▲775.79 ▲0.1586.97 ▼3.3636.49 ▼5.54
Posts /wp-admin/edit.php2,164 ▲672.29 ▲0.2738.19 ▼2.3129.69 ▼4.50
Add New Post /wp-admin/post-new.php1,574 ▲4823.35 ▲0.46605.83 ▲9.3631.93 ▼18.02
Media Library /wp-admin/upload.php1,462 ▲594.40 ▲0.12101.06 ▲1.6147.68 ▲1.72
Add New /wp-admin/post-new.php?post_type=wpob-popover2,2077.67171.4465.73
Setting /wp-admin/edit.php?post_type=wpob-popover&page=global_settings1,1772.5645.9626.63
How to Use /wp-admin/edit.php?post_type=wpob-popover&page=how_to_use8751.9328.2130.95
WP Popover /wp-admin/edit.php?post_type=wpob-popover1,1302.2437.7531.10

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • wpobp_global_settings
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-popover/view/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-popover/view/how_to_use.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-popover/wp-popover.php:52

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: popover, info, jquery popover, bootstrap popover, popup...

wp-popover/wp-popover.php 85% from 13 tests

The primary PHP file in "WP Popover" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("3.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected375 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP48224275
CSS217169
JavaScript29131

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
4 PNG files occupy 0.29MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png67.79KB17.78KB▼ 73.77%
assets/screenshot-4.png122.29KB35.26KB▼ 71.17%
assets/screenshot-3.png41.49KB9.46KB▼ 77.19%
assets/screenshot-2.png64.21KB17.69KB▼ 72.46%