84% counter-strike-server-viewer

Code Review | CsViewer

WordPress plugin CsViewer scored84%from 54 tests.

About plugin

  • Plugin page: counter-strike-se...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Apr 15, 2013
  • Latest release: Oct 22, 2014
  • Number of updates: 23
  • Update frequency: every 66.7 days
  • Top authors: rainbow-six3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,150 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.51ms] Passed 4 tests

An overview of server-side resources used by CsViewer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.48 ▼2.76
Dashboard /wp-admin3.32 ▲0.0143.63 ▼2.98
Posts /wp-admin/edit.php3.37 ▲0.0142.46 ▼9.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.78 ▲1.13
Media Library /wp-admin/upload.php3.24 ▲0.0134.13 ▲1.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for CsViewer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.141.72 ▼0.0642.53 ▼3.64
Dashboard /wp-admin2,203 ▲125.81 ▼0.09100.17 ▼0.6239.66 ▼1.15
Posts /wp-admin/edit.php2,071 ▼182.04 ▲0.0237.66 ▲0.6834.02 ▲0.41
Add New Post /wp-admin/post-new.php1,537 ▲2323.40 ▲5.84648.43 ▲21.2760.05 ▲10.05
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.00101.03 ▲7.7539.82 ▼2.08

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

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

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/counter-strike-server-viewer/csviewer.php:12

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)
Everything seems fine on the user side

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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (To show the Screenshot visite the my Homepage)
The official readme.txt might help

counter-strike-server-viewer/csviewer.php 92% from 13 tests

The entry point to "CsViewer" version 1.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("counter-strike-server-viewer.php" instead of "csviewer.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
Everything looks great! No dangerous files found in this plugin220 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23114215
CSS1015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods952.94%
▷ Protected methods00.00%
▷ Private methods847.06%
Functions1
▷ Named functions1100.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
No PNG files were detected