89% remove-post-using-ajax-in-admin

Code Review | Remove Post Using Ajax in Admin

WordPress plugin Remove Post Using Ajax in Admin scored89%from 54 tests.

About plugin

  • Plugin page: remove-post-using...
  • Plugin version: 0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Dec 3, 2019
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: developer1996 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

A check of server-side resources used by Remove Post Using Ajax in Admin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.61 ▼7.97
Dashboard /wp-admin3.31 ▲0.0144.72 ▼6.53
Posts /wp-admin/edit.php3.36 ▲0.0147.62 ▼0.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.41 ▼23.03
Media Library /wp-admin/upload.php3.23 ▲0.0135.03 ▲0.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Remove Post Using Ajax in Admin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.21 ▼0.941.62 ▼0.2140.51 ▼4.10
Dashboard /wp-admin2,208 ▲204.90 ▲0.02111.66 ▼9.0638.70 ▼8.36
Posts /wp-admin/edit.php2,097 ▲82.02 ▼0.0039.65 ▲3.9734.11 ▼3.72
Add New Post /wp-admin/post-new.php1,542 ▲2018.42 ▼4.74635.63 ▼34.4449.16 ▼24.67
Media Library /wp-admin/upload.php1,396 ▲54.29 ▲0.0597.22 ▼1.0745.31 ▲3.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "#"
  • Screenshots: Screenshot #1 (Delete post using ajax) image required
The official readme.txt is a good inspiration

remove-post-using-ajax-in-admin/remove-post-using-ajax-admin.php 77% from 13 tests

The main PHP file in "Remove Post Using Ajax in Admin" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("remove-post-using-ajax-in-admin.php" instead of "remove-post-using-ajax-admin.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin53 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131331
JavaScript17622

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected