84% instant-breaking-news

Code Review | Instant Breaking News

WordPress plugin Instant Breaking News scored84%from 54 tests.

About plugin

  • Plugin page: instant-breaking-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 4, 2020
  • Latest release: Oct 3, 2022
  • Number of updates: 5
  • Update frequency: every 170.2 days
  • Top authors: GeroNikolov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,527 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.62MB] [CPU: ▼18.14ms] Passed 4 tests

An overview of server-side resources used by Instant Breaking News
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.35 ▲3.59
Dashboard /wp-admin3.38 ▲0.0749.22 ▼8.63
Posts /wp-admin/edit.php3.43 ▲0.0748.68 ▼1.82
Add New Post /wp-admin/post-new.php3.22 ▼2.6738.49 ▼64.60
Media Library /wp-admin/upload.php3.30 ▲0.0736.63 ▲2.49

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Instant Breaking News
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.56 ▼0.649.41 ▲7.2242.98 ▼0.66
Dashboard /wp-admin2,235 ▲555.88 ▲0.3298.64 ▼5.4238.79 ▼19.69
Posts /wp-admin/edit.php2,145 ▲452.32 ▲0.3041.24 ▲1.4034.59 ▼0.44
Add New Post /wp-admin/post-new.php6,857 ▲5,31225.98 ▲2.95968.31 ▲284.4841.30 ▼12.90
Media Library /wp-admin/upload.php1,434 ▲344.48 ▲0.16100.24 ▼7.2646.31 ▼0.61

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/instant-breaking-news/metaboxes/breaking-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/instant-breaking-news/ibn.php:25
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/instant-breaking-news/pages/dashboard.php:3

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: open source, breaking news, universal

instant-breaking-news/ibn.php 92% from 13 tests

The primary PHP file in "Instant Breaking News" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("instant-breaking-news.php" instead of "ibn.php")

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
Everything looks great! No dangerous files found in this plugin674 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP47161360
JavaScript23132167
Sass218283
CSS22264

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin