10% gna-miscellaneous

Code Review | GNA Miscellaneous

WordPress plugin GNA Miscellaneous scored10%from 54 tests.

About plugin

  • Plugin page: gna-miscellaneous
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2016
  • Latest release: Jan 18, 2017
  • Number of updates: 36
  • Update frequency: every 7.5 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,107 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_Miscellaneous::activate_handler() should not be called statically

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.30ms] Passed 4 tests

An overview of server-side resources used by GNA Miscellaneous
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.12 ▲0.15
Dashboard /wp-admin3.32 ▲0.0244.48 ▼6.83
Posts /wp-admin/edit.php3.44 ▲0.0846.91 ▲1.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.93 ▼4.42
Media Library /wp-admin/upload.php3.24 ▲0.0236.06 ▲1.89

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

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

Browser metrics Passed 4 tests

A check of browser resources used by GNA Miscellaneous
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.56 ▼0.741.77 ▼0.0043.19 ▲3.08
Dashboard /wp-admin2,224 ▲365.84 ▼0.06102.49 ▼10.8982.02 ▲39.01
Posts /wp-admin/edit.php2,110 ▲211.99 ▼0.0437.56 ▼2.7332.93 ▼1.89
Add New Post /wp-admin/post-new.php1,538 ▲523.10 ▼0.25683.97 ▲25.6154.26 ▲3.82
Media Library /wp-admin/upload.php1,406 ▲154.21 ▼0.0196.33 ▲0.6168.07 ▲23.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_Miscellaneous::deactivate_handler() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-miscellaneous/inc/gna-miscellaneous-config.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_Miscellaneous_Admin_Menu' not found in wp-content/plugins/gna-miscellaneous/admin/gna-miscellaneous-admin-settings-menu.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Donate link: Invalid URI ("none")
The official readme.txt might help

gna-miscellaneous/gna-miscellaneous.php Passed 13 tests

The main file in "GNA Miscellaneous" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
41 characters long description:
Easy to set-up the some feature functions

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin720 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP69944662
CSS13044
JavaScript10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.20
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods58
▷ Static methods46.90%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/gna_20x20.png2.98KB0.33KB▼ 88.89%