84% wph-breaking-news

Code Review | WPH Breaking News

WordPress plugin WPH Breaking News scored84%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: 6.3.1
  • 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

10+ active /2,755 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.97ms] Passed 4 tests

Server-side resources used by WPH Breaking News
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.33 ▼6.09
Dashboard /wp-admin3.33 ▲0.0351.28 ▼1.15
Posts /wp-admin/edit.php3.38 ▲0.0248.32 ▲0.85
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.98 ▼9.48
Media Library /wp-admin/upload.php3.26 ▲0.0238.55 ▲7.73

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WPH Breaking News
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.381.63 ▲0.0140.79 ▲3.71
Dashboard /wp-admin2,209 ▲244.88 ▼0.02109.58 ▲5.7141.16 ▼1.53
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0039.85 ▼1.4434.49 ▼1.93
Add New Post /wp-admin/post-new.php6,357 ▲4,81526.06 ▲7.86868.69 ▲261.8950.37 ▼12.47
Media Library /wp-admin/upload.php1,385 ▼34.14 ▼0.1292.45 ▼11.0841.90 ▼4.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • 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 shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Post metabox for configure status and time.)
The official readme.txt is a good inspiration

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

The main file in "WPH Breaking News" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected185 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22817100
PO File2121262
Markdown114023

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.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%