78% mynewsdesk

Code Review | Mynewsdesk

WordPress plugin Mynewsdesk scored78%from 54 tests.

About plugin

  • Plugin page: mynewsdesk
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2013
  • Latest release: Jun 30, 2016
  • Number of updates: 22
  • Update frequency: every 57.2 days
  • Top authors: mansoormunib (81.82%)mnddev (22.73%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,312 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.79ms] Passed 4 tests

Server-side resources used by Mynewsdesk
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.38 ▼8.87
Dashboard /wp-admin3.35 ▲0.0145.92 ▼18.54
Posts /wp-admin/edit.php3.40 ▲0.0549.89 ▲3.20
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.39 ▼11.03
Media Library /wp-admin/upload.php3.27 ▲0.0534.24 ▼0.70
myNewsDesk /wp-admin/options-general.php?page=mnd-plugin-options_options3.2534.51

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mynewsdesk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.88 ▼0.4810.31 ▲8.6136.87 ▼6.70
Dashboard /wp-admin2,202 ▲255.61 ▼0.0692.27 ▲1.9437.80 ▼0.78
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0239.29 ▲4.9436.15 ▼1.99
Add New Post /wp-admin/post-new.php1,531 ▼1523.01 ▲5.13664.05 ▲20.9851.03 ▼15.74
Media Library /wp-admin/upload.php1,401 ▲14.24 ▲0.0797.63 ▼0.7442.14 ▼4.38
myNewsDesk /wp-admin/options-general.php?page=mnd-plugin-options_options9342.0123.4925.47

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mnd-plugin-options_options
    • > 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/options-general.php?page=mnd-plugin-options_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mynewsdesk/wpMyNewsDesk.php:12
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/mynewsdesk/wpMyNewsDesk.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/mynewsdesk/shortcode.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/mynewsdesk/settings.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/mynewsdesk/options.php:2

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: press releases, mynewsdesk, wordpress mynewsdesk, wpmynewsdesk, my news desk

mynewsdesk/wpMyNewsDesk.php 92% from 13 tests

"Mynewsdesk" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mynewsdesk.php" instead of "wpMyNewsDesk.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin326 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44317264
CSS17237
JavaScript10025

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin