84% bdnews-headline

Code Review | BDNEWS Headlines

WordPress plugin BDNEWS Headlines scored84%from 54 tests.

About plugin

  • Plugin page: bdnews-headline
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2015
  • Latest release: Apr 10, 2016
  • Number of updates: 17
  • Update frequency: every 14.2 days
  • Top authors: ahrana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by BDNEWS Headlines
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.14 ▼1.49
Dashboard /wp-admin3.32 ▲0.0245.78 ▼1.24
Posts /wp-admin/edit.php3.37 ▲0.0247.62 ▲3.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.87 ▼26.26
Media Library /wp-admin/upload.php3.24 ▲0.0237.06 ▲3.07

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_bdnews_bangla
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for BDNEWS Headlines
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲14114.13 ▼0.627.04 ▲4.9239.27 ▼4.46
Dashboard /wp-admin2,206 ▲186.06 ▲1.17110.22 ▼4.0041.55 ▲0.05
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0541.68 ▲3.5134.67 ▲1.89
Add New Post /wp-admin/post-new.php1,542 ▲518.24 ▼4.87590.32 ▼0.6855.11 ▲1.64
Media Library /wp-admin/upload.php1,391 ▲64.26 ▲0.0598.13 ▼5.6240.67 ▼4.40

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_bdnews_bangla
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bdnews-headline/functions.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/bdnews-headline/index.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/bdnews-headline/index.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/bdnews-headline/index.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Widgets), #2 (Live Example)
You can take inspiration from this readme.txt

bdnews-headline/index.php 92% from 13 tests

This is the main PHP file of "BDNEWS Headlines" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bdnews-headline.php" instead of "index.php")

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,140 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript270469819
CSS23723185
PHP29316136

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png42.30KB14.21KB▼ 66.41%
screenshot-2.png19.90KB8.03KB▼ 59.65%