72% wp-peon

Code Review | WP Peon

WordPress plugin WP Peon scored72%from 54 tests.

About plugin

  • Plugin page: wp-peon
  • Plugin version: v1.0.0...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2015
  • Latest release: Jan 30, 2016
  • Number of updates: 9
  • Update frequency: every 13.6 days
  • Top authors: soachishti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.32MB] [CPU: ▼12.89ms] Passed 4 tests

Server-side resources used by WP Peon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0630.13 ▼11.31
Dashboard /wp-admin3.33 ▲0.0351.27 ▲1.44
Posts /wp-admin/edit.php3.38 ▲0.0249.06 ▲0.36
Add New Post /wp-admin/post-new.php4.62 ▼1.2743.86 ▼41.26
Media Library /wp-admin/upload.php3.25 ▲0.0237.45 ▲0.65
Execute PHP /wp-admin/admin.php?page=wp-peon-execute3.2635.94
WP Explorer /wp-admin/admin.php?page=wp-peon-explorer3.2430.34
Custom HTML /wp-admin/admin.php?page=wp-peon-custom-html3.2330.72
WP Peon /wp-admin/tools.php?page=wp-peon3.2230.30
Advance /wp-admin/admin.php?page=wp-peon-advance3.2330.86

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Peon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲15613.58 ▼0.805.61 ▲3.2042.94 ▼4.20
Dashboard /wp-admin2,217 ▲655.90 ▲0.20100.04 ▼8.0643.44 ▲1.27
Posts /wp-admin/edit.php2,097 ▲82.13 ▲0.0935.65 ▲2.3532.91 ▼0.71
Add New Post /wp-admin/post-new.php1,521 ▼1423.36 ▲0.16653.73 ▼6.6851.49 ▼4.84
Media Library /wp-admin/upload.php1,399 ▲114.18 ▼0.0697.74 ▼15.0040.76 ▼8.17
Execute PHP /wp-admin/admin.php?page=wp-peon-execute9332.0524.6924.61
WP Explorer /wp-admin/admin.php?page=wp-peon-explorer1,2002.0522.4826.11
Custom HTML /wp-admin/admin.php?page=wp-peon-custom-html9872.0623.7627.31
WP Peon /wp-admin/tools.php?page=wp-peon8192.0224.2427.45
Advance /wp-admin/admin.php?page=wp-peon-advance8802.0222.9025.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% 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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wp-peon-explorer
    • > Warning in wp-content/plugins/wp-peon/admin/partials/wp-peon-explorer.php+17
    Use of undefined constant _ABSPATH - assumed '_ABSPATH' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=wp-peon-explorer
    • > Notice in wp-content/plugins/wp-peon/admin/partials/wp-peon-explorer.php+87
    Undefined index: path
    • > GET request to /wp-admin/admin.php?page=wp-peon-custom-html
    • > Notice in wp-content/plugins/wp-peon/admin/partials/wp-peon-custom-html.php+75
    Undefined index: header
    • > GET request to /wp-admin/admin.php?page=wp-peon-custom-html
    • > Notice in wp-content/plugins/wp-peon/admin/partials/wp-peon-custom-html.php+83
    Undefined index: footer
    • > GET request to /wp-admin/admin.php?page=wp-peon-custom-html
    • > Notice in wp-content/plugins/wp-peon/admin/partials/wp-peon-custom-html.php+91
    Undefined index: after_post
    • > GET request to /wp-admin/admin.php?page=wp-peon-custom-html
    • > Notice in wp-content/plugins/wp-peon/admin/partials/wp-peon-custom-html.php+99
    Undefined index: before_post
    • > GET request to /wp-admin/admin.php?page=wp-peon-advance
    • > Warning in wp-content/plugins/wp-peon/admin/partials/wp-peon-advance.php+72
    file_get_contents(wp-content/debug.log): failed to open stream: No such file or directory

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-peon/public/partials/wp-peon-public-display.php
    • > /wp-content/plugins/wp-peon/admin/partials/wp-peon-admin-display.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php on line 17
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php on line 17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php:17
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php on line 17
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php on line 17
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php on line 17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php:17
    • > PHP Notice
      Undefined index: page in wp-content/plugins/wp-peon/admin/partials/wp-peon-header.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: editor, explorer, wp-config, execute, htaccess...

wp-peon/wp-peon.php 92% from 13 tests

The primary PHP file in "WP Peon" version v1.0.0... is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "v1.0.0...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin844 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP18250577838
JavaScript24546
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity2.14
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin