84% common-tools-for-site

Code Review | Common Tools for Site

WordPress plugin Common Tools for Site scored84%from 54 tests.

About plugin

  • Plugin page: common-tools-for-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 4
  • Update frequency: every 111.3 days
  • Top authors: thechetanvaghela (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /209 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼1.80ms] Passed 4 tests

Server-side resources used by Common Tools for Site
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.56 ▼1.66
Dashboard /wp-admin3.46 ▲0.1657.25 ▲6.08
Posts /wp-admin/edit.php3.57 ▲0.2253.54 ▲2.93
Add New Post /wp-admin/post-new.php6.06 ▲0.1888.71 ▼6.94
Media Library /wp-admin/upload.php3.38 ▲0.1534.67 ▼1.51

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 17 new options
New WordPress options
widget_theysaidso_widget
wpct-back-to-top-enable
widget_recent-comments
wpct-backtotop-color
theysaidso_admin_options
wpct-uninstall-enable
wpct-scroll-progress-color
wpct-scroll-progress-bar
wpct-progress-bar-enable
wpct-mime-types-enable
...

Browser metrics Passed 4 tests

A check of browser resources used by Common Tools for Site
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲17213.63 ▼0.615.94 ▲3.9642.72 ▼4.84
Dashboard /wp-admin2,241 ▲534.85 ▼0.01134.61 ▲25.4545.32 ▼1.57
Posts /wp-admin/edit.php2,124 ▲352.03 ▼0.0237.60 ▲1.1534.92 ▼1.98
Add New Post /wp-admin/post-new.php1,531 ▲1723.15 ▲5.45680.34 ▼22.3960.50 ▲8.77
Media Library /wp-admin/upload.php1,420 ▲324.22 ▼0.01105.09 ▼5.0345.60 ▼3.46

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 17 options in the database
    • wpct-back-to-top-enable
    • widget_recent-comments
    • wpct-scroll-progress-color
    • widget_recent-posts
    • wpct-scroll-progress-bar
    • theysaidso_admin_options
    • wpct-loader-enable
    • db_upgraded
    • wpct-mime-types-enable
    • wpct-loader-image
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/common-tools-for-site/admin/partials/wp-common-tools-admin-display.php
    • > /wp-content/plugins/common-tools-for-site/public/partials/wp-common-tools-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: admin bar, back to top, page loader, svg support, wp-admin logo...

common-tools-for-site/wp-common-tools.php 85% from 13 tests

The principal PHP file in "Common Tools for Site" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("common-tools-for-site.php" instead of "wp-common-tools.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,349 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12174581896
CSS22235285
JavaScript22211168

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.71
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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