10% devnia-pm-based-on-cartpauj-pm

Code Review | Bootstrap Devnia PM based on Cartpauj-PM wordpress

WordPress plugin Bootstrap Devnia PM based on Cartpauj-PM wordpress scored10%from 54 tests.

About plugin

  • Plugin page: devnia-pm-based-o...
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.9.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2015
  • Latest release: Jan 6, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: waheeds (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /3,468 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/pm-class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; cartpaujPM has a deprecated constructor

Server metrics [RAM: ▼1.55MB] [CPU: ▼60.12ms] Passed 4 tests

Server-side resources used by Bootstrap Devnia PM based on Cartpauj-PM wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.016.09 ▼40.98
Dashboard /wp-admin2.47 ▼0.888.01 ▼57.24
Posts /wp-admin/edit.php2.47 ▼0.896.98 ▼44.46
Add New Post /wp-admin/post-new.php2.47 ▼3.427.21 ▼97.81
Media Library /wp-admin/upload.php2.47 ▼0.767.29 ▼35.64

Server storage [IO: ▲0.63MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/devnia-pm-based-on-cartpauj-pm/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 91 new files
Database: 2 new tables, 7 new options
New tables
wp_cartpauj_pm_messages
wp_cartpauj_pm_attachments
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
cartpaujPM_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bootstrap Devnia PM based on Cartpauj-PM wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6213.24 ▼1.312.08 ▲0.3240.68 ▼4.26
Dashboard /wp-admin2,219 ▲165.76 ▲0.74100.15 ▼2.7542.98 ▲2.22
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0334.50 ▼3.6633.40 ▼3.71
Add New Post /wp-admin/post-new.php1,547 ▼13321.92 ▼0.58693.86 ▼6.3952.42 ▼0.80
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.05130.77 ▲11.0655.03 ▲5.24
Cartpauj PM /wp-admin/pm-class.php260.440.0914.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/pm-class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; cartpaujPM has a deprecated constructor
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_cartpauj_pm_attachments
    • wp_cartpauj_pm_messages
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • cartpaujPM_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/devnia-pm-based-on-cartpauj-pm/download.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/js/search.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/js/search.php:6
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/js/search.php on line 6
    • > PHP Notice
      Undefined index: q in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/js/search.php on line 4
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/pm-class.php on line 122
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/pm-class.php:234
    • > PHP Notice
      Trying to get property 'users' of non-object in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/js/search.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/devnia-pm-based-on-cartpauj-pm/pm-class.php on line 121

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/pm-class.php
    • > Network (severe)
    wp-admin/pm-class.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
Please take inspiration from this readme.txt

devnia-pm-based-on-cartpauj-pm/pm-main.php 77% from 13 tests

The principal PHP file in "Bootstrap Devnia PM based on Cartpauj-PM wordpress" v. 1.0.12 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 269 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("devnia-pm-based-on-cartpauj-pm.php" instead of "pm-main.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin10,700 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS14106,083
PO File171,6251,8923,519
PHP51481251,021
JavaScript19674
Markdown1103

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity55.00
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.17MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bbc/color.png47.30KB0.18KB▼ 99.63%
images/bbc/email.png3.32KB0.62KB▼ 81.22%
images/bbc/url.png3.25KB0.52KB▼ 84.08%
images/bbc/u.png2.97KB0.34KB▼ 88.55%
images/bbc/b.png3.02KB0.42KB▼ 86.21%