83% local-number

Code Review | Local Number for Wordpress

WordPress plugin Local Number for Wordpress scored83%from 54 tests.

About plugin

  • Plugin page: local-number
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2020
  • Latest release: Mar 4, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: localnumber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /416 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Local Number for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.19 ▲0.41
Dashboard /wp-admin3.35 ▲0.0444.17 ▼1.93
Posts /wp-admin/edit.php3.40 ▲0.0447.48 ▲1.38
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.74 ▼9.43
Media Library /wp-admin/upload.php3.27 ▲0.0432.93 ▼4.18
Local Number /wp-admin/options-general.php?page=localnumber3.2129.82

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Local Number for Wordpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.21 ▼1.161.67 ▼0.2143.53 ▲2.41
Dashboard /wp-admin2,207 ▲185.83 ▼0.1094.63 ▼9.9535.08 ▼8.85
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0438.34 ▲2.1734.63 ▼3.00
Add New Post /wp-admin/post-new.php1,517 ▼1123.37 ▲0.12626.59 ▼44.7752.56 ▲1.15
Media Library /wp-admin/upload.php1,389 ▲14.22 ▲0.0493.16 ▼12.3942.55 ▼2.06
Local Number /wp-admin/options-general.php?page=localnumber8052.0326.6425.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=localnumber
    • > Notice in wp-content/plugins/local-number/localnumber.php+165
    Undefined index: default

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

local-number/localnumber.php 85% from 13 tests

"Local Number for Wordpress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("local-number.php" instead of "localnumber.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 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected165 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32933165

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin