73% lite-wp-logger

Code Review | WP Logger

WordPress plugin WP Logger scored73%from 54 tests.

About plugin

  • Plugin page: lite-wp-logger
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Dec 27, 2022
  • Number of updates: 30
  • Update frequency: every 8.4 days
  • Top authors: dandeli0n (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /467 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.66MB] [CPU: ▲29.35ms] 75% from 4 tests

Server-side resources used by WP Logger
Please have a look at the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.66MB on /wp-admin/admin.php?page=wplogger-wizard)
PageMemory (MB)CPU Time (ms)
Home /9.14 ▲5.6875.58 ▲35.91
Dashboard /wp-admin9.16 ▲5.8680.03 ▲28.80
Posts /wp-admin/edit.php9.16 ▲5.8087.51 ▲37.96
Add New Post /wp-admin/post-new.php11.19 ▲5.30114.26 ▲15.13
Media Library /wp-admin/upload.php9.16 ▲5.9374.34 ▲37.57
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius9.1664.50
Wizard /wp-admin/admin.php?page=wplogger-wizard9.1666.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 318 new files
Database: no new tables, 14 new options
New WordPress options
wplog_type_children
fs_active_plugins
wplog_importance_children
widget_recent-posts
can_compress_scripts
wplogger-session-init
theysaidso_admin_options
db_upgraded
wplogger-first-init
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Logger
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲12814.47 ▲0.191.77 ▲0.0229.98 ▼14.04
Dashboard /wp-admin2,268 ▲804.89 ▼1.01109.13 ▼0.0973.38 ▲33.76
Posts /wp-admin/edit.php2,169 ▲802.01 ▲0.0238.76 ▲0.6833.29 ▼2.44
Add New Post /wp-admin/post-new.php1,574 ▲4121.91 ▼1.26733.38 ▲52.8742.41 ▼14.06
Media Library /wp-admin/upload.php1,462 ▲774.24 ▼0.0598.54 ▼2.9669.90 ▲24.91
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,1401.7224.3930.26
Wizard /wp-admin/admin.php?page=wplogger-wizard1,3931.8734.3172.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/lite-wp-logger/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • wplog_importance_children
    • db_upgraded
    • wplog_type_children
    • can_compress_scripts
    • fs_debug_mode
    • fs_accounts
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_theysaidso_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Result\\AbstractSoftware' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Result/Device.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Result\\AbstractSoftware' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Result/AbstractVersionedSoftware.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Result\\AbstractClient' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Result/AbstractSoftware.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Exception\\DomainException' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Exception/FetcherException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'UAParser\\Util\\Logfile\\ReaderInterface' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Util/Logfile/AbstractReader.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Result\\AbstractVersionedSoftware' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Result/OperatingSystem.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\AbstractParser' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/OperatingSystemParser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Exception\\DomainException' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Exception/ReaderException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\AbstractParser' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Parser.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/lite-wp-logger/vendor/ua-parser/uap-php/src/Command/ConvertCommand.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (20 tag instead of maximum 10)
You can look at the official readme.txt

lite-wp-logger/wplogger.php 85% from 13 tests

Analyzing the main PHP file in "WP Logger" version 2.0.0
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lite-wp-logger.php" instead of "wplogger.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin68,341 lines of code in 243 files:
LanguageFilesBlank linesComment linesLines of code
PHP1818,92219,77444,870
CSS263,25128719,911
JavaScript251345112,886
Markdown41100342
JSON300251
SVG20037
Bourne Shell111029
XML10015

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity52.26
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces15
Interfaces1
Traits1
Classes97
▷ Abstract classes77.22%
▷ Concrete classes9092.78%
▷ Final classes44.44%
Methods1,569
▷ Static methods26116.63%
▷ Public methods1,11971.32%
▷ Protected methods553.51%
▷ Private methods39525.18%
Functions107
▷ Named functions9992.52%
▷ Anonymous functions87.48%
Constants156
▷ Global constants10164.74%
▷ Class constants5535.26%
▷ Public constants55100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/jui/ui-bg_highlight-soft_75_cccccc_1x100.png0.31KB0.18KB▼ 42.95%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/admin/img/jui/ui-bg_glass_65_ffffff_1x400.png0.24KB0.09KB▼ 64.23%
assets/admin/img/jui/ui-icons_454545_256x240.png6.91KB4.18KB▼ 39.44%
assets/admin/img/jui/ui-icons_2e83ff_256x240.png4.49KB4.18KB▼ 6.89%