84% awstats-report-viewer

Code Review | AWStats Report Viewer

WordPress plugin AWStats Report Viewer scored84%from 54 tests.

About plugin

  • Plugin page: awstats-report-vi...
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2014
  • Latest release: Sep 14, 2015
  • Number of updates: 18
  • Update frequency: every 16.3 days
  • Top authors: xpointer (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /5,858 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.50MB] [CPU: ▼2.82ms] Passed 4 tests

Server-side resources used by AWStats Report Viewer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4338.34 ▲0.98
Dashboard /wp-admin3.88 ▲0.5348.45 ▼11.62
Posts /wp-admin/edit.php3.93 ▲0.5752.33 ▲2.39
Add New Post /wp-admin/post-new.php6.39 ▲0.5183.67 ▼3.04
Media Library /wp-admin/upload.php3.74 ▲0.5139.36 ▲4.90

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

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

Browser metrics Passed 4 tests

Checking browser requirements for AWStats Report Viewer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.29 ▼1.074.17 ▲2.1540.08 ▼0.90
Dashboard /wp-admin2,222 ▲314.79 ▼1.1098.98 ▼5.8937.76 ▲0.74
Posts /wp-admin/edit.php2,105 ▲132.00 ▲0.0239.19 ▲0.7136.30 ▲0.33
Add New Post /wp-admin/post-new.php1,527 ▼617.39 ▼5.82651.01 ▼22.3857.54 ▲6.19
Media Library /wp-admin/upload.php1,407 ▲194.19 ▼0.0195.85 ▼6.9543.99 ▼1.84

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 118× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\MVC\\MVCComponenetsLayer' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/MVC/View/Base.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\Forms\\Fields\\FormField' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/Forms/Fields/String.class.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\Forms\\HTML\\Elements\\HTMLFormNode' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/Forms/HTML/ElementsCollection.class.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\Forms\\HTML\\Elements\\HTMLFormNode' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/Forms/HTML/Elements/Element.abstract.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\HDT\\XML\\XMLWriterPrototype' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/Plugin/Config/XML/Services/Type.class.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\Forms\\HTML\\Elements\\HTMLFormElement' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/Forms/HTML/Elements/Checkbox.class.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPFW\\MVC\\Model\\State\\IModelStateAdapter' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/MVC/Model/State/WordpressOptionsAdpater.abstract.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'WPPFW\\MVC\\IMVCComponentsLayer' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/MVC/MVCLayer.abstract.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\MVC\\Model\\PluginModel' not found in wp-content/plugins/awstats-report-viewer/Modules/Installer/Model/Installer.class.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WPPFW\\Plugin\\ServiceFrontProxy' not found in wp-content/plugins/awstats-report-viewer/vendor/xptrdev/WPPluginFramework/Include/Plugin/MVCRequestInputFrontProxy.class.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

awstats-report-viewer/awstats-report-viewer.php Passed 13 tests

The main PHP script in "AWStats Report Viewer" version 0.7.1 is automatically included on every request by WordPress
58 characters long description:
View CPanel's AWStats report via Wordpress Dashboard page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected5,023 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
PHP1771,5996,6104,599
HTML4132256
XML162107
JSON30058
CSS1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.05
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces43
Interfaces27
Traits0
Classes144
▷ Abstract classes3927.08%
▷ Concrete classes10572.92%
▷ Final classes00.00%
Methods686
▷ Static methods71.02%
▷ Public methods57683.97%
▷ Protected methods10815.74%
▷ Private methods20.29%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants00.00%
▷ Class constants19100.00%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin