83% wp-context-for-getsitecontrol

Code Review | WP context for GetSiteControl

WordPress plugin WP context for GetSiteControl scored83%from 54 tests.

About plugin

  • Plugin page: wp-context-for-ge...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: Nov 22, 2018
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: Mat_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /547 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.66ms] Passed 4 tests

A check of server-side resources used by WP context for GetSiteControl
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.32 ▼4.13
Dashboard /wp-admin3.32 ▲0.0243.42 ▼3.50
Posts /wp-admin/edit.php3.37 ▲0.0149.48 ▲2.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.13 ▼17.26
Media Library /wp-admin/upload.php3.25 ▲0.0139.75 ▲6.07

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP context for GetSiteControl
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.32 ▼1.324.35 ▲2.4242.57 ▲3.25
Dashboard /wp-admin2,206 ▲154.86 ▼1.04113.66 ▲7.4647.44 ▲6.60
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0040.04 ▲3.9636.17 ▲4.81
Add New Post /wp-admin/post-new.php1,514 ▼1917.59 ▼5.38656.89 ▼3.5159.53 ▼13.76
Media Library /wp-admin/upload.php1,385 ▼04.20 ▼0.0195.53 ▲0.3440.74 ▲1.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-context-for-getsitecontrol/wp-getsitecontrol-tag.php

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

readme.txt 94% 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
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

wp-context-for-getsitecontrol/wp-getsitecontrol-tag.php 77% from 13 tests

The main file in "WP context for GetSiteControl" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-context-for-getsitecontrol.php" instead of "wp-getsitecontrol-tag.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 detected80 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1261658
Markdown110022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.76
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin