84% numbersq

Code Review | NumbersQ

WordPress plugin NumbersQ scored84%from 54 tests.

About plugin

  • Plugin page: numbersq
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2023
  • Latest release: Feb 26, 2023
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: agraddy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.37MB] [CPU: ▼0.35ms] Passed 4 tests

An overview of server-side resources used by NumbersQ
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3940.56 ▼3.01
Dashboard /wp-admin3.71 ▲0.4150.00 ▼1.47
Posts /wp-admin/edit.php3.76 ▲0.4155.01 ▲4.77
Add New Post /wp-admin/post-new.php6.23 ▲0.35100.20 ▲5.03
Media Library /wp-admin/upload.php3.57 ▲0.3438.10 ▼1.68
Settings /wp-admin/admin.php?page=numbersq_settings3.8236.57
Numbers /wp-admin/admin.php?page=numbersq_numbers3.5537.85
Keys /wp-admin/edit.php?post_type=numbersq_key3.6837.92

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for NumbersQ
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.28 ▼0.111.98 ▲0.4938.48 ▼2.85
Dashboard /wp-admin2,222 ▲485.60 ▼0.0983.94 ▼10.1244.66 ▲0.42
Posts /wp-admin/edit.php2,130 ▲302.01 ▼0.0141.33 ▼0.1237.67 ▲1.63
Add New Post /wp-admin/post-new.php1,548 ▲2223.28 ▲0.12613.62 ▼94.5757.85 ▼7.28
Media Library /wp-admin/upload.php1,427 ▲274.21 ▲0.1099.25 ▼18.9142.78 ▼2.35
Settings /wp-admin/admin.php?page=numbersq_settings3,3562.0426.1929.34
Numbers /wp-admin/admin.php?page=numbersq_numbers9432.0025.6930.11
Keys /wp-admin/edit.php?post_type=numbersq_key1,0801.9532.1129.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/numbersq/views/admin_settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/numbersq/views/admin_numbers.php:1

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: revenue, woocommerce, numbers, statistics, report...

numbersq/main.php 92% from 13 tests

The main PHP file in "NumbersQ" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("numbersq.php" instead of "main.php")

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 detected2,166 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP193171112,031
JavaScript2173121
CSS12014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.12
▷ Minimum class complexity2.00
▷ Maximum class complexity119.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods85
▷ Static methods3642.35%
▷ Public methods8498.82%
▷ Protected methods00.00%
▷ Private methods11.18%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin