84% metronet-log

Code Review | Metronet Log

WordPress plugin Metronet Log scored84%from 54 tests.

About plugin

  • Plugin page: metronet-log
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Jan 9, 2013
  • Latest release: Jan 9, 2013
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: ronalfy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,012 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Metronet Log
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.07 ▼5.64
Dashboard /wp-admin3.35 ▲0.0448.37 ▲1.24
Posts /wp-admin/edit.php3.40 ▲0.0443.80 ▼0.38
Add New Post /wp-admin/post-new.php5.93 ▲0.0476.60 ▼17.52
Media Library /wp-admin/upload.php3.27 ▲0.0336.11 ▲1.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Metronet Log
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.931.73 ▼0.2038.03 ▼7.15
Dashboard /wp-admin2,200 ▲155.79 ▼0.07101.27 ▼16.6739.63 ▼3.85
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0033.42 ▼4.1434.60 ▼0.16
Add New Post /wp-admin/post-new.php1,533 ▲523.19 ▲0.05652.91 ▼24.0956.60 ▲6.38
Media Library /wp-admin/upload.php1,382 ▼04.16 ▼0.0395.59 ▼1.3743.32 ▲1.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metronet-log/metronet-log-view.php:157
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/metronet-log/class-metronet-log-list-table.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/metronet-log/metronet-log.php:369

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: users, api, log, logging

metronet-log/metronet-log-view.php 92% from 13 tests

Analyzing the main PHP file in "Metronet Log" version 0.1
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("metronet-log.php" instead of "metronet-log-view.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin404 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP484228404

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity21.00
▷ Minimum class complexity13.00
▷ Maximum class complexity27.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin