84% nakhabarnews

Code Review | Nakhabar News

WordPress plugin Nakhabar News scored 84% from 54 tests.

About plugin

  • Plugin page: nakhabarnews
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Nov 24, 2015
  • Latest release: Jan 24, 2018
  • Number of updates: 30
  • Update frequency: every 27.0 days
  • Top authors: aidev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.95ms] Passed 4 tests

Server-side resources used by Nakhabar News
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.85 ▼5.78
Dashboard /wp-admin3.32 ▲0.0245.31 ▼2.74
Posts /wp-admin/edit.php3.37 ▲0.0143.86 ▼3.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.16 ▼7.48
Media Library /wp-admin/upload.php3.24 ▲0.0138.37 ▲3.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Nakhabar News
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.61 ▼1.125.58 ▲3.7938.95 ▼1.12
Dashboard /wp-admin2,230 ▲425.86 ▲0.97102.79 ▼29.0668.34 ▲5.71
Posts /wp-admin/edit.php2,110 ▲182.01 ▲0.0139.30 ▼1.4633.14 ▼4.27
Add New Post /wp-admin/post-new.php1,695 ▲18124.96 ▲7.38719.07 ▲42.2052.61 ▼12.21
Media Library /wp-admin/upload.php1,406 ▲214.18 ▼0.0696.27 ▼14.4468.30 ▲19.54

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_nn_nakhabarnews
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nakhabarnews/NakhabarNews.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === nakhabarnews === )
Please take inspiration from this readme.txt

nakhabarnews/NakhabarNews.php 92% from 13 tests

Analyzing the main PHP file in "Nakhabar News" version 1.2
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("nakhabarnews.php" instead of "NakhabarNews.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 plugin312 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15913256
CSS16444
JavaScript10012

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.34
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
PNG images were not found in this plugin