10% breaking-news-posts

Code Review | Breaking News Posts

WordPress plugin Breaking News Posts scored10%from 54 tests.

About plugin

  • Plugin page: breaking-news-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 8, 2020
  • Latest release: Jun 9, 2020
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: dimandu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /489 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Error in wp-admin/includes/template.php+40
    Cannot redeclare wp_category_checklist() (previously declared in wp-admin/includes/template.php:40)

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

Analyzing server-side resources used by Breaking News Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.67 ▼1.80
Dashboard /wp-admin3.31 ▲0.0051.53 ▼5.24
Posts /wp-admin/edit.php3.36 ▲0.0050.72 ▲3.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.74 ▼14.18
Media Library /wp-admin/upload.php3.23 ▲0.0034.41 ▼1.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Breaking News Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.201.72 ▼0.2443.16 ▼3.65
Dashboard /wp-admin2,198 ▲245.55 ▼0.0094.28 ▼0.7941.56 ▼8.72
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0236.27 ▼0.5439.62 ▲0.41
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▼0.21722.52 ▲90.7661.30 ▲2.45
Media Library /wp-admin/upload.php1,394 ▼64.19 ▲0.01100.25 ▼1.9043.57 ▼3.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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:
  • Requires at least: Invalid plugin version format
The official readme.txt might help

breaking-news-posts/index.php 85% from 13 tests

"Breaking News Posts" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("breaking-news-posts.php" instead of "index.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
Good job! No executable or dangerous file extensions detected10,328 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,1954110,163
PHP83714146
JavaScript17019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected