62% counter-number

Code Review | Counter Number

WordPress plugin Counter Number scored 62% from 54 tests.

About plugin

  • Plugin page: counter-number
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9
  • WordPress version: 6.3.1
  • First release: Apr 17, 2022
  • Latest release: Apr 17, 2022
  • Number of updates: 5
  • Update frequency: every 6.6 days
  • Top authors: mehrab6310 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 600 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.98MB] [CPU: ▼0.25ms] Passed 4 tests

An overview of server-side resources used by Counter Number
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9742.75 ▲2.11
Dashboard /wp-admin4.28 ▲0.9847.90 ▲1.04
Posts /wp-admin/edit.php4.40 ▲1.0454.41 ▲6.01
Add New Post /wp-admin/post-new.php6.87 ▲0.9887.54 ▼10.16
Media Library /wp-admin/upload.php4.21 ▲0.9842.38 ▲8.60
WpMart Plugins /wp-admin/admin.php?page=con-6310-wpmart-plugins4.1833.40
How to use /wp-admin/admin.php?page=con-6310-counter-number-use4.1838.74
Import/Export Plugin /wp-admin/admin.php?page=con-6310-counter-number-import-export4.2048.92
Template 11-20 /wp-admin/admin.php?page=con-6310-template-11-204.4234.91
Manage Items /wp-admin/admin.php?page=con-6310-counter-number-manage-items4.4945.64
License /wp-admin/admin.php?page=con-6310-counter-number-license4.1834.65
Template 01-10 /wp-admin/admin.php?page=con-6310-template-01-104.3936.01
All Counter Number /wp-admin/admin.php?page=con-6310-counter-number4.1944.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 128 new files
Database: 1 new table, 7 new options
New tables
wp_con_6310_style
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
con_6310_version_info

Browser metrics Passed 4 tests

Checking browser requirements for Counter Number
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲19613.99 ▼0.388.34 ▲6.4939.01 ▼8.84
Dashboard /wp-admin2,247 ▲565.84 ▲0.75103.54 ▼3.5739.57 ▼2.55
Posts /wp-admin/edit.php2,136 ▲472.01 ▲0.0237.22 ▼1.1633.39 ▼0.92
Add New Post /wp-admin/post-new.php1,579 ▲4623.26 ▲0.20646.75 ▼49.1255.76 ▼3.85
Media Library /wp-admin/upload.php1,438 ▲474.28 ▲0.0997.56 ▼8.8740.49 ▼7.29
WpMart Plugins /wp-admin/admin.php?page=con-6310-wpmart-plugins1,0222.7343.1860.38
How to use /wp-admin/admin.php?page=con-6310-counter-number-use3,58143.83961.4270.46
Import/Export Plugin /wp-admin/admin.php?page=con-6310-counter-number-import-export1,1823.9862.1647.67
Template 11-20 /wp-admin/admin.php?page=con-6310-template-11-209,7572.8197.67382.15
Manage Items /wp-admin/admin.php?page=con-6310-counter-number-manage-items5,9333.9755.4838.10
License /wp-admin/admin.php?page=con-6310-counter-number-license9622.6934.4233.14
Template 01-10 /wp-admin/admin.php?page=con-6310-template-01-104,97219.47608.69383.35
All Counter Number /wp-admin/admin.php?page=con-6310-counter-number9372.6539.1440.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 does not fully uninstall, leaving 1 table in the database
    • wp_con_6310_style
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • con_6310_version_info
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/counter-number/settings/helper/tab-menu.php
  • 101× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/templates/template-03.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/output/template-03.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/helper/_helper-01.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/counter-number/settings/form/_form-12.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/css/_css-17.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/helper/_helper-19.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/helper/_helper-20.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/css/_css-11.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/counter-number/settings/form/_form-02.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/counter-number/settings/templates/template-07.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=con-6310-template-11-20
    • > Network (severe)
    https://pluginsbd.com/wp-content/project-images/counter-number/5.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=con-6310-template-11-20
    • > Network (severe)
    https://pluginsbd.com/wp-content/project-images/counter-number/1.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=con-6310-template-11-20
    • > Network (severe)
    https://pluginsbd.com/wp-content/project-images/counter-number/10.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=con-6310-template-01-10
    • > Network (severe)
    https://www.pluginsbd.com/wp-content/plugin-images/con/1.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=con-6310-template-01-10
    • > Network (severe)
    https://www.pluginsbd.com/wp-content/plugin-images/con/9.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Counter Number Template 01-10), #2 (Counter Number Template 11-20)
You can take inspiration from this readme.txt

counter-number/index.php 92% from 13 tests

The main PHP file in "Counter Number" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("counter-number.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected24,882 lines of code in 122 files:
LanguageFilesBlank linesComment linesLines of code
PHP1091,03245919,104
CSS6221295,068
JavaScript74828710

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.74
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%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.43MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/fs-sprite.png1.07KB0.18KB▼ 82.82%
assets/css/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/css/hover.png1.27KB0.66KB▼ 48.23%
assets/images/demo-1.png372.25KB163.80KB▼ 56.00%