84% news-manager

Code Review | News Manager

WordPress plugin News Manager scored84%from 54 tests.

About plugin

  • Plugin page: news-manager
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2013
  • Latest release: Jun 16, 2016
  • Number of updates: 26
  • Update frequency: every 37.7 days
  • Top authors: dfactory (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /42,457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.72MB] [CPU: ▼2.70ms] Passed 4 tests

This is a short check of server-side resources used by News Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7743.97 ▲2.77
Dashboard /wp-admin4.07 ▲0.7250.97 ▼11.95
Posts /wp-admin/edit.php4.13 ▲0.7751.09 ▲5.98
Add New Post /wp-admin/post-new.php6.58 ▲0.7086.57 ▼7.60
Media Library /wp-admin/upload.php3.92 ▲0.6943.22 ▲12.51
Add New /wp-admin/post-new.php?post_type=news4.1455.10
Settings /wp-admin/edit.php?post_type=news&page=news-settings3.8639.16
Categories /wp-admin/edit-tags.php?taxonomy=news-category&post_type=news3.9144.20
All News /wp-admin/edit.php?post_type=news4.0437.56
Tags /wp-admin/edit-tags.php?taxonomy=news-tag&post_type=news3.9140.80

Server storage [IO: ▲0.25MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
news_manager_version
widget_news_manager_calendar_widget
widget_news_manager_tags_widget
widget_news_manager_list_widget
widget_news_manager_categories_widget
widget_theysaidso_widget
widget_recent-posts
widget_news_manager_archive_widget
...

Browser metrics Passed 4 tests

News Manager: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.27 ▼1.091.81 ▼0.0636.86 ▼6.92
Dashboard /wp-admin2,245 ▲575.80 ▲0.9398.07 ▼19.4439.64 ▼6.36
Posts /wp-admin/edit.php2,125 ▲332.03 ▲0.0133.29 ▼6.2332.26 ▼4.12
Add New Post /wp-admin/post-new.php1,565 ▲15223.38 ▲5.39640.79 ▲38.1757.99 ▲15.44
Media Library /wp-admin/upload.php1,421 ▲334.22 ▲0.0198.68 ▼2.1642.63 ▲1.17
Add New /wp-admin/post-new.php?post_type=news2,6897.96193.4768.40
Settings /wp-admin/edit.php?post_type=news&page=news-settings1,1761.7123.5634.53
Categories /wp-admin/edit-tags.php?taxonomy=news-category&post_type=news1,2982.1427.5927.49
All News /wp-admin/edit.php?post_type=news1,1612.0031.4229.08
Tags /wp-admin/edit-tags.php?taxonomy=news-tag&post_type=news1,2732.1425.5628.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 12 options
    • widget_news_manager_tags_widget
    • widget_news_manager_list_widget
    • widget_theysaidso_widget
    • news_manager_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_news_manager_categories_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_news_manager_calendar_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=news&page=news-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/edit.php?post_type=news&page=news-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can look at the official readme.txt

news-manager/news-manager.php 92% from 13 tests

The principal PHP file in "News Manager" v. 1.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin3,390 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP65172882,150
CSS345165773
PO File1171186400
JavaScript39158
XML1009

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity46.22
▷ Minimum class complexity5.00
▷ Maximum class complexity140.00
Average method complexity6.22
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods78
▷ Static methods00.00%
▷ Public methods7292.31%
▷ Protected methods00.00%
▷ Private methods67.69%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
9 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-dfactory.png2.92KB1.92KB▼ 34.20%
images/icon-news-32.png1.59KB1.58KB▼ 0.68%
css/images/bg_fallback.png3.63KB0.30KB▼ 91.72%
css/images/icon_sprite.png3.14KB2.30KB▼ 26.70%
css/images/slider_handles.png1.90KB1.31KB▼ 30.90%