84% display-site-numbers

Code Review | Display Site Numbers

WordPress plugin Display Site Numbers scored84%from 54 tests.

About plugin

  • Plugin page: display-site-numbers
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 7, 2015
  • Latest release: Aug 9, 2023
  • Number of updates: 34
  • Update frequency: every 92.2 days
  • Top authors: fmarzocca (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,930 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.06ms] Passed 4 tests

A check of server-side resources used by Display Site Numbers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.39 ▲4.35
Dashboard /wp-admin3.36 ▲0.0649.17 ▼1.42
Posts /wp-admin/edit.php3.41 ▲0.0548.88 ▼1.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.49 ▼0.82
Media Library /wp-admin/upload.php3.29 ▲0.0538.94 ▲4.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Display Site Numbers
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.161.72 ▼0.0145.42 ▼2.63
Dashboard /wp-admin2,198 ▲215.61 ▼0.0592.89 ▲2.5738.73 ▼3.21
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0140.94 ▲3.4737.58 ▲2.46
Add New Post /wp-admin/post-new.php1,528 ▼023.39 ▲0.29663.13 ▼49.9755.34 ▼10.52
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.07110.02 ▲5.2347.48 ▲1.38

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_display-site-numbers
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/display-site-numbers/display-site-numbers.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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: count posts, counters, widget, count categories

display-site-numbers/display-site-numbers.php Passed 13 tests

The principal PHP file in "Display Site Numbers" v. 1.0 is loaded by WordPress automatically on each request
53 characters long description:
A widget to display all relevant site content numbers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin344 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP14536176
PO File35454156
CSS11112

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin