10% gna-send-post

Code Review | GNA Send Post

WordPress plugin GNA Send Post scored10%from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /998 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_SendPost::activate_handler() should not be called statically

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.08ms] Passed 4 tests

A check of server-side resources used by GNA Send Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.67 ▼0.98
Dashboard /wp-admin3.35 ▲0.0151.48 ▼14.64
Posts /wp-admin/edit.php3.46 ▲0.1147.65 ▼5.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.85 ▼23.42
Media Library /wp-admin/upload.php3.27 ▲0.0441.72 ▲11.34

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

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

Browser metrics Passed 4 tests

A check of browser resources used by GNA Send Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.58 ▲0.291.80 ▲0.1140.59 ▼6.31
Dashboard /wp-admin2,198 ▲275.52 ▼0.0285.81 ▼8.1273.47 ▲28.90
Posts /wp-admin/edit.php2,115 ▲152.01 ▼0.0038.28 ▲1.1933.57 ▼1.54
Add New Post /wp-admin/post-new.php1,553 ▲2723.10 ▼0.09767.81 ▲114.1948.77 ▼6.22
Media Library /wp-admin/upload.php1,409 ▲94.28 ▲0.11110.93 ▲2.0977.42 ▲34.44

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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_SendPost::deactivate_handler() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-send-post/inc/gna-send-post-config.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_SendPost_Admin_Menu' not found in wp-content/plugins/gna-send-post/admin/gna-send-post-admin-settings-menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: "none"
Please take inspiration from this readme.txt

gna-send-post/gna-send-post.php Passed 13 tests

The principal PHP file in "GNA Send Post" v. 0.9.2 is loaded by WordPress automatically on each request
66 characters long description:
Automatically send or update when new post is created or modified.

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
Good job! No executable or dangerous file extensions detected309 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP66234309

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.17
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods46
▷ Static methods48.70%
▷ Public methods46100.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

It is recommended to compress PNG files in your plugin to 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%