89% nudge-publisher

Code Review | Nudge Publisher

WordPress plugin Nudge Publisher scored89%from 54 tests.

About plugin

  • Plugin page: nudge-publisher
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Dec 18, 2015
  • Number of updates: 5
  • Update frequency: every 1.8 days
  • Top authors: Giveitanudge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /865 total downloads

Benchmarks

Plugin footprint 83% 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.06MB] [CPU: ▼14.91ms] Passed 4 tests

A check of server-side resources used by Nudge Publisher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.88 ▼8.69
Dashboard /wp-admin3.39 ▲0.0546.85 ▼14.80
Posts /wp-admin/edit.php3.51 ▲0.1545.24 ▼6.93
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.25 ▼29.23
Media Library /wp-admin/upload.php3.32 ▲0.0936.16 ▲2.85
Nudge Publisher /wp-admin/options-general.php?page=ndg-admin-codes3.2834.32

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_ndg_plublisher_codes
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
ndg_plublisher_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nudge Publisher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.24 ▼0.531.69 ▼0.4438.14 ▼6.37
Dashboard /wp-admin2,199 ▲225.58 ▼0.0181.94 ▼7.8844.09 ▲3.57
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0633.57 ▼4.1436.77 ▲6.33
Add New Post /wp-admin/post-new.php6,225 ▲4,69918.95 ▼4.16884.25 ▲279.5758.02 ▲9.57
Media Library /wp-admin/upload.php1,401 ▲14.17 ▼0.10103.37 ▲8.4846.28 ▲5.54
Nudge Publisher /wp-admin/options-general.php?page=ndg-admin-codes8602.0426.2227.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • ndg_plublisher_version
    • widget_recent-comments
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

nudge-publisher/ndg-publisher.php 92% from 13 tests

The principal PHP file in "Nudge Publisher" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nudge-publisher.php" instead of "ndg-publisher.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin645 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6134121611
CSS16034

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity14.20
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods36
▷ Static methods719.44%
▷ Public methods1850.00%
▷ Protected methods1233.33%
▷ Private methods616.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.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