78% pushnews

Code Review | Pushnews

WordPress plugin Pushnews scored 78% from 54 tests.

About plugin

  • Plugin page: pushnews
  • Plugin version: 3.10.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2016
  • Latest release: Nov 16, 2022
  • Number of updates: 77
  • Update frequency: every 28.6 days
  • Top authors: tixastronauta (68.83%)mariobalca (15.58%)impactingdigital (14.29%)pnkaki (5.19%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 13,023 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.54MB] [CPU: ▼4.22ms] Passed 4 tests

A check of server-side resources used by Pushnews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1349.37 ▲5.27
Dashboard /wp-admin3.45 ▲0.1557.05 ▲7.46
Posts /wp-admin/edit.php3.56 ▲0.2161.90 ▲13.32
Add New Post /wp-admin/post-new.php3.30 ▼2.5955.76 ▼36.04
Media Library /wp-admin/upload.php3.37 ▲0.1537.74 ▲6.43

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
pushnews_options

Browser metrics Passed 4 tests

Checking browser requirements for Pushnews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10014.47 ▼0.122.44 ▲0.4957.94 ▲13.04
Dashboard /wp-admin2,212 ▲244.92 ▼0.89176.06 ▲71.1881.93 ▲35.16
Posts /wp-admin/edit.php2,113 ▲242.04 ▲0.0346.16 ▲10.7445.16 ▲10.35
Add New Post /wp-admin/post-new.php6,529 ▲4,99620.02 ▼3.39998.60 ▲317.5873.82 ▲22.34
Media Library /wp-admin/upload.php1,409 ▲214.26 ▲0.07108.40 ▼0.6847.98 ▲1.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pushnews/sdk/pushnews-sw.js.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/pushnews/views/metabox.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pushnews/views/config.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pushnews/pushnews.php:32

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 88% 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
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Screenshots: Screenshot #4 (No HTTPS website is required) image not found
You can look at the official readme.txt

pushnews/pushnews.php Passed 13 tests

The main file in "Pushnews" v. 3.10.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
Increase your website traffic with Pushnews Web Push Notifications.

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 plugin1,176 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP6138180679
PO File27276238
Markdown3920159
CSS116589
SVG11010
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity38.50
▷ Minimum class complexity2.00
▷ Maximum class complexity75.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods28100.00%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants27
▷ Global constants27.41%
▷ Class constants2592.59%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/images/icon-128x128.png1.45KB1.51KB0.00%
views/images/icon-512x512.png5.12KB5.42KB0.00%
views/images/icon-256x256.png2.43KB2.58KB0.00%
views/images/banner-772x250.png7.81KB9.24KB0.00%