10% kush-micro-news

Code Review | Kush Micro News

WordPress plugin Kush Micro News scored 10% from 54 tests.

About plugin

  • Plugin page: kush-micro-news
  • Plugin version: 1.6.7
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: May 11, 2013
  • Latest release: Jun 2, 2016
  • Number of updates: 81
  • Update frequency: every 13.8 days
  • Top authors: kushsharma (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active / 11,197 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/kush-micro-news/index.php+83
    Methods with the same name as their class will not be constructors in a future version of PHP; KushMNWidget has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼185.53ms] Passed 4 tests

A check of server-side resources used by Kush Micro News
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.83 ▼0.895.72 ▼14.36
Dashboard /wp-admin1.85 ▼1.205.41 ▼31.00
Posts /wp-admin/edit.php1.85 ▼1.265.71 ▼40.14
Add New Post /wp-admin/post-new.php1.85 ▼3.586.31 ▼644.89
Media Library /wp-admin/upload.php1.85 ▼1.156.04 ▼26.09
Micro News /wp-admin/admin.php?page=micro-news1.855.62
Settings /wp-admin/admin.php?page=micro-news-config1.855.33
Add New /wp-admin/admin.php?page=micro-news-new1.855.38

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 20 new options
New tables
wp_kushmicronews
New WordPress options
kush_mn_show_linkclean
kush_mn_color_text
kush_mn_load_nav_swap
kush_mn_read_story_text
kush_mn_load_newtab
kush_mn_head_highlightColor
kush_mn_show_lborder
kush_mn_widget_name
kush_mn_editor_access
kush_mn_head_enable
...

Browser metrics Passed 4 tests

Checking browser requirements for Kush Micro News
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,719 ▲12315.89 ▲0.179.12 ▲0.3150.78 ▲2.00
Dashboard /wp-admin3,005 ▲716.14 ▼0.06134.04 ▼16.62102.56 ▼4.49
Posts /wp-admin/edit.php2,777 ▲382.74 ▲0.0264.84 ▼3.5487.30 ▼5.43
Add New Post /wp-admin/post-new.php1,698 ▼2,02818.81 ▲3.61359.70 ▼68.22106.97 ▲3.58
Media Library /wp-admin/upload.php1,845 ▲355.04 ▼0.01140.53 ▼5.91119.22 ▲4.06
Micro News /wp-admin/admin.php?page=micro-news1,1212.1254.1667.37
Settings /wp-admin/admin.php?page=micro-news-config1,8332.2256.4681.27
Add New /wp-admin/admin.php?page=micro-news-new1,1922.0954.2893.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/kush-micro-news/index.php+83
    Methods with the same name as their class will not be constructors in a future version of PHP; KushMNWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_kush-micro-news

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=micro-news-new
    • > Deprecated in wp-content/plugins/kush-micro-news/index.php+83
    Methods with the same name as their class will not be constructors in a future version of PHP; KushMNWidget has a deprecated constructor

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/kush-micro-news/includes/core.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/kush-micro-news/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kush-micro-news/includes/admin.php:6

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Preview of output2. Adding new micro news3. Editing/Deleating old micro news.4. Widget) image not found
The official readme.txt is a good inspiration

kush-micro-news/index.php 92% from 13 tests

The main PHP script in "Kush Micro News" version 1.6.7 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("kush-micro-news.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
Success! There were no dangerous files found in this plugin1,146 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP520461875
CSS16317270
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png38.40KB20.37KB▼ 46.95%
screenshot-1.png24.04KB13.76KB▼ 42.77%
assets/img/santa-hat-icon.png0.40KB0.41KB0.00%
screenshot-4.png9.03KB5.04KB▼ 44.23%
screenshot-2.png8.59KB5.01KB▼ 41.60%