10% plugins-genius

Code Review | Plugins Genius

WordPress plugin Plugins Genius scored10%from 54 tests.

About plugin

  • Plugin page: plugins-genius
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.6
  • WordPress version: 6.3.1
  • First release: Apr 10, 2013
  • Latest release: Aug 29, 2016
  • Number of updates: 23
  • Update frequency: every 53.8 days
  • Top authors: marcocanestrari (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,268 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/plugins-genius/plugins-genius.php+82
    Undefined index: pg_post_action

Server metrics [RAM: ▼1.81MB] [CPU: ▼52.06ms] Passed 4 tests

Server-side resources used by Plugins Genius
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.296.48 ▼36.16
Dashboard /wp-admin2.19 ▼1.118.20 ▼44.37
Posts /wp-admin/edit.php2.19 ▼1.168.87 ▼42.43
Add New Post /wp-admin/post-new.php2.19 ▼3.697.48 ▼85.28
Media Library /wp-admin/upload.php2.19 ▼1.046.93 ▼25.23
Plugins Genius /wp-admin/plugins.php?tab=genius2.207.46

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

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/plugins-genius/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
pg_old_active_plugins
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Plugins Genius
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.28 ▼1.304.44 ▲2.2241.23 ▼4.49
Dashboard /wp-admin2,222 ▲215.83 ▲0.91107.12 ▼7.7139.68 ▼4.47
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0139.83 ▲4.3035.06 ▼0.06
Add New Post /wp-admin/post-new.php1,553 ▲823.06 ▼0.27676.56 ▲23.7968.79 ▲10.64
Media Library /wp-admin/upload.php1,404 ▲44.22 ▼0.0096.43 ▼8.5047.54 ▲2.04
Plugins Genius /wp-admin/plugins.php?tab=genius1,5422.1134.9851.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/plugins-genius/plugins-genius.php+82
    Undefined index: pg_post_action
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > Notice in wp-content/plugins/plugins-genius/plugins-genius.php+277
    Undefined index: pg_post_action
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > Deprecated in wp-content/plugins/plugins-genius/plugins-genius.php+92
    Non-static method PluginsGenius::wp_get_active_and_valid_genius_plugins() should not be called statically
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > Warning in wp-content/plugins/plugins-genius/plugins-genius.php+38
    include_once(plugins-genius/plugins-genius.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > Warning in wp-content/plugins/plugins-genius/plugins-genius.php+38
    include_once(): Failed opening 'plugins-genius/plugins-genius.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > User deprecated in wp-includes/functions.php+5453
    Function wp_setcookie is deprecated since version 2.5.0! Use wp_set_auth_cookie() instead.
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > User deprecated in wp-includes/functions.php+5453
    Function wp_clearcookie is deprecated since version 2.5.0! Use wp_clear_auth_cookie() instead.
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > User deprecated in wp-includes/functions.php+5463
    Function wp_get_cookie_login is deprecated since version 2.5.0 with no alternative available.
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > User deprecated in wp-includes/functions.php+5453
    Function wp_login is deprecated since version 2.5.0! Use wp_signon() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > Notice in wp-content/plugins/plugins-genius/plugins-genius.php+242
    Undefined variable: action
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?tab=genius
    • > Notice in wp-content/plugins/plugins-genius/plugins-genius.php+412
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHWPINC/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/plugins-genius/plugins-genius.php on line 18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugins-genius/plugins-genius.php on line 18
    • > PHP Warning
      require(ABSPATHWPINC/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/plugins-genius/plugins-genius.php on line 18
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/plugins-genius/plugins-genius.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 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: role, admin, plugins, speed, frontend...

plugins-genius/plugins-genius.php Passed 13 tests

The main file in "Plugins Genius" v. 2.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
33 characters long description:
Role-based active plugins manager

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin361 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP117163361

PHP code Passed 2 tests

This is a very shot review 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.51
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity5.79
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods642.86%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 files were detected