84% counts-section

Code Review | Counts Section

WordPress plugin Counts Section scored84%from 54 tests.

About plugin

  • Plugin page: counts-section
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2022
  • Latest release: Apr 21, 2022
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: mohamedmkhadah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Counts Section
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.32 ▲1.21
Dashboard /wp-admin3.34 ▲0.0449.35 ▼6.10
Posts /wp-admin/edit.php3.39 ▲0.0451.01 ▼1.50
Add New Post /wp-admin/post-new.php5.92 ▲0.04108.39 ▲12.48
Media Library /wp-admin/upload.php3.26 ▲0.0432.65 ▼4.20

Server storage [IO: ▲0.24MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Counts Section: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18513.64 ▼0.736.52 ▲4.8140.61 ▼2.14
Dashboard /wp-admin2,225 ▲375.85 ▲0.81100.05 ▼1.4340.71 ▲1.97
Posts /wp-admin/edit.php2,108 ▲222.18 ▲0.1641.40 ▲3.2935.61 ▲1.75
Add New Post /wp-admin/post-new.php1,527 ▲817.92 ▼5.30605.69 ▼54.1653.62 ▲2.80
Media Library /wp-admin/upload.php1,407 ▲164.19 ▼0.0795.39 ▼10.2646.78 ▲3.11

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/counts-section/counts.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: counts section, counts, pages, posts, counts posts

counts-section/counts.php 85% from 13 tests

"Counts Section" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("counts-section.php" instead of "counts.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

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 plugin189 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258171
CSS25917
JavaScript1071

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin