68% mjpostkiller

Code Review | WP MJPostKiller

WordPress plugin WP MJPostKiller scored68%from 54 tests.

About plugin

  • Plugin page: mjpostkiller
  • Plugin version: v0.0.0.1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Feb 4, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: mohsenshahbazi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /640 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.95MB] [CPU: ▼42.91ms] Passed 4 tests

An overview of server-side resources used by WP MJPostKiller
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.66 ▲4.87
Dashboard /wp-admin3.00 ▼0.3525.73 ▼46.62
Posts /wp-admin/edit.php3.00 ▼0.3627.50 ▼26.20
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.59 ▼85.96
Media Library /wp-admin/upload.php3.00 ▼0.2325.17 ▼12.86
فیلترینگ MJ+ /wp-admin/admin.php?page=mjmenu3.0040.30
تنظیمات /wp-admin/admin.php?page=mj_admin3.0027.38

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP MJPostKiller
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.43 ▲0.001.88 ▲0.1844.13 ▼1.24
Dashboard /wp-admin2,222 ▲515.65 ▼0.0596.34 ▲3.5347.46 ▲2.47
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0435.63 ▼5.1841.39 ▲4.80
Add New Post /wp-admin/post-new.php1,567 ▲4123.38 ▲5.72646.91 ▼58.8969.52 ▲10.90
Media Library /wp-admin/upload.php1,427 ▲274.20 ▼0.03128.22 ▲17.0465.47 ▲20.76
فیلترینگ MJ+ /wp-admin/admin.php?page=mjmenu8212.0123.8542.21
تنظیمات /wp-admin/admin.php?page=mj_admin8032.0525.4133.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
These errors were triggered by the plugin
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mj_admin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mjpostkiller/mj_plugin.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mjpostkiller/mj_admin_setting.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: prevent spam post, postkiller, prevent posts with forbidden title, prevent spam, kill posts

mjpostkiller/mj_plugin.php 85% from 13 tests

Analyzing the main PHP file in "WP MJPostKiller" version v0.0.0.1...
Please take the time to fix the following:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "v0.0.0.1...")
  • Main file name: Name the main plugin file the same as the plugin slug ("mjpostkiller.php" instead of "mj_plugin.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
No dangerous file extensions were detected52 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212752

PHP code Passed 2 tests

An overview 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.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There were not PNG files found in your plugin