94% wph-breaking-news

Code Review | WPH Breaking News

WordPress plugin WPH Breaking News scored 94% from 54 tests.

About plugin

  • Plugin page: wph-breaking-news
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2
  • WordPress version: 5.9.2
  • First release: Mar 4, 2014
  • Latest release: May 19, 2019
  • Number of updates: 7
  • Update frequency: every 271.7 days
  • Top authors: m_uysl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,535 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼299.70ms] Passed 4 tests

A check of server-side resources used by WPH Breaking News
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0657.68 ▼11.58
Dashboard /wp-admin3.44 ▲0.0333.06 ▼2.38
Posts /wp-admin/edit.php3.67 ▲0.0339.50 ▲1.20
Add New Post /wp-admin/post-new.php6.91 ▼0.0697.34 ▼1,183.98
Media Library /wp-admin/upload.php3.32 ▲0.0225.85 ▼0.86

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WPH Breaking News
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5116.20 ▲0.845.69 ▼0.842.72 ▲0.32
Dashboard /wp-admin2,892 ▲416.11 ▼0.05122.16 ▼29.73217.53 ▲55.12
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0161.01 ▼6.01133.48 ▼9.20
Add New Post /wp-admin/post-new.php1,932 ▲27120.03 ▼1.91410.47 ▲5.36178.41 ▲6.60
Media Library /wp-admin/upload.php1,695 ▼05.50 ▼0.02151.36 ▼2.39203.49 ▼19.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wph-breaking-news/wph-breaking-news.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Post metabox for configure status and time.) image missing
Please take inspiration from this readme.txt

wph-breaking-news/wph-breaking-news.php Passed 13 tests

This is the main PHP file of "WPH Breaking News" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Easy way to announce "Breaking News" on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin185 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22817100
PO File2121262
Markdown114023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity3.00
▷ Maximum class complexity11.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.86KB8.27KB▼ 70.31%