10% gna-tasks

Code Review | GNA Tasks

WordPress plugin GNA Tasks scored10%from 54 tests.

About plugin

  • Plugin page: gna-tasks
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: Apr 18, 2016
  • Latest release: Sep 5, 2016
  • Number of updates: 7
  • Update frequency: every 34.7 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /663 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_Tasks::activate_handler() should not be called statically

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.61ms] Passed 4 tests

Analyzing server-side resources used by GNA Tasks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0338.55 ▼1.30
Dashboard /wp-admin3.38 ▲0.0547.12 ▼0.65
Posts /wp-admin/edit.php3.49 ▲0.1148.03 ▼2.20
Add New Post /wp-admin/post-new.php5.96 ▲0.0495.25 ▼10.28
Media Library /wp-admin/upload.php3.30 ▲0.0435.14 ▲0.56

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for GNA Tasks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.30 ▼1.083.92 ▲1.9837.05 ▼6.14
Dashboard /wp-admin2,221 ▲354.92 ▼0.01100.53 ▼10.9160.44 ▲15.25
Posts /wp-admin/edit.php2,107 ▲212.01 ▲0.0240.03 ▲2.9635.11 ▲1.95
Add New Post /wp-admin/post-new.php1,538 ▲1918.33 ▼5.22703.28 ▲22.8868.95 ▲14.21
Media Library /wp-admin/upload.php1,403 ▲184.25 ▲0.06111.23 ▲8.8245.58 ▼0.17

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_Tasks_Admin_Menu' not found in wp-content/plugins/gna-tasks/admin/gna-tasks-admin-settings-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-tasks/inc/gna-tasks-config.php:13

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 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (General Settings Page.)
  • Donate link: Invalid URI found ("none")
The official readme.txt might help

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

The principal PHP file in "GNA Tasks" v. 0.9.2 is loaded by WordPress automatically on each request
33 characters long description:
Provides a task management system

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected306 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP66233306

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods45
▷ Static methods48.89%
▷ Public methods45100.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

PNG files should be compressed to save space and minimize bandwidth usage
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%