62% profpanda-hidden-things

Code Review | ProfPanda Hidden Things

WordPress plugin ProfPanda Hidden Things scored62%from 54 tests.

About plugin

  • Plugin page: profpanda-hidden-...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Jul 4, 2019
  • Number of updates: 14
  • Update frequency: every 64.5 days
  • Top authors: profpanda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /994 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.11MB] [CPU: ▼48.03ms] Passed 4 tests

A check of server-side resources used by ProfPanda Hidden Things
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▼0.5915.88 ▼24.34
Dashboard /wp-admin2.91 ▼0.4316.40 ▼43.28
Posts /wp-admin/edit.php2.91 ▼0.4516.52 ▼36.00
Add New Post /wp-admin/post-new.php2.91 ▼2.9816.54 ▼88.48
Media Library /wp-admin/upload.php2.91 ▼0.3218.22 ▼18.64
ProfPanda Hidden Things /wp-admin/options-general.php?page=pht2.9118.69

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

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

Browser metrics Passed 4 tests

Checking browser requirements for ProfPanda Hidden Things
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,611 ▼15014.68 ▲0.291.27 ▼0.2439.69 ▲0.91
Dashboard /wp-admin2,202 ▲225.58 ▼0.0883.14 ▼5.0041.33 ▲0.62
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0636.00 ▲0.0334.19 ▼1.47
Add New Post /wp-admin/post-new.php1,531 ▲323.18 ▲0.07668.45 ▼10.5753.31 ▲1.14
Media Library /wp-admin/upload.php1,404 ▲14.13 ▼0.13111.35 ▲8.7448.23 ▲2.63
ProfPanda Hidden Things /wp-admin/options-general.php?page=pht1,1622.0228.7429.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/profpanda-hidden-things/profpanda_hidden_things.php+1024
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Notice in wp-content/plugins/profpanda-hidden-things/profpanda_hidden_things.php+671
    Trying to access array offset on value of type bool

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/profpanda-hidden-things/profpanda_hidden_things.php:29

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=pht 207 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=pht 215 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=pht 223 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=pht 231 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=pht 239 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=pht
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=pht 247 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

profpanda-hidden-things/profpanda_hidden_things.php 85% from 13 tests

The main PHP file in "ProfPanda Hidden Things" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("profpanda-hidden-things.php" instead of "profpanda_hidden_things.php")

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
Everything looks great! No dangerous files found in this plugin1,143 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2127131920
PO File16478147
JavaScript19040
CSS18036

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions43
▷ Named functions43100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin