83% counter-wpmenir

Code Review | Counter WordPress

WordPress plugin Counter WordPress scored 83% from 54 tests.

About plugin

  • Plugin page: counter-wpmenir
  • Plugin version: 3.2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.3
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: Mar 27, 2020
  • Number of updates: 37
  • Update frequency: every 41.1 days
  • Top authors: sadegh3333 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,102 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.03ms] Passed 4 tests

An overview of server-side resources used by Counter WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0339.42 ▼1.17
Dashboard /wp-admin3.33 ▲0.0353.44 ▲8.87
Posts /wp-admin/edit.php3.38 ▲0.0249.73 ▲3.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.57 ▼2.77
Media Library /wp-admin/upload.php3.25 ▲0.0233.39 ▲0.37

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Counter WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.28 ▼1.144.51 ▲2.8843.80 ▼0.49
Dashboard /wp-admin2,223 ▲354.87 ▼0.04112.57 ▲7.9143.11 ▲2.74
Posts /wp-admin/edit.php2,106 ▲142.04 ▲0.0434.89 ▼1.2531.30 ▼4.31
Add New Post /wp-admin/post-new.php1,533 ▼023.34 ▲0.07686.95 ▲15.9768.39 ▲11.87
Media Library /wp-admin/upload.php1,405 ▲144.22 ▲0.0196.72 ▼9.9745.42 ▼1.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/counter-wpmenir/cw.init.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/counter-wpmenir/old.version.php:15

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

counter-wpmenir/cw.init.php 77% from 13 tests

The main PHP file in "Counter WordPress" ver. 3.2.1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("counter-wpmenir.php" instead of "cw.init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin520 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS16717349
PHP65749139
JavaScript112432

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 are no PNG files in this plugin