68% coreactivity

Code Review | coreActivity: Activity Logging plugin for WordPress

WordPress plugin coreActivity: Activity Logging plugin for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: coreactivity
  • Plugin version: 1.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2023
  • Latest release: Nov 15, 2023
  • Number of updates: 17
  • Update frequency: every 2.5 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /284 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.87MB] [CPU: ▲15.49ms] Passed 4 tests

Server-side resources used by coreActivity: Activity Logging plugin for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.08 ▲2.6153.22 ▲14.27
Dashboard /wp-admin6.26 ▲2.9563.00 ▲11.38
Posts /wp-admin/edit.php6.38 ▲3.0166.84 ▲18.03
Add New Post /wp-admin/post-new.php8.86 ▲2.97113.72 ▲18.26
Media Library /wp-admin/upload.php6.19 ▲2.9555.28 ▲21.89
Tools /wp-admin/admin.php?page=coreactivity-tools6.3692.57
Events /wp-admin/admin.php?page=coreactivity-events6.6260.21
Setup Wizard /wp-admin/admin.php?page=coreactivity-wizard6.3753.25
Settings /wp-admin/admin.php?page=coreactivity-settings6.3253.19
About /wp-admin/admin.php?page=coreactivity-about6.3248.61
Logs /wp-admin/admin.php?page=coreactivity-logs7.0763.34
Overview /wp-admin/admin.php?page=coreactivity-dashboard6.4866.60

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

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

Browser metrics Passed 4 tests

A check of browser resources used by coreActivity: Activity Logging plugin for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲17914.14 ▲0.011.83 ▲0.0938.97 ▼6.34
Dashboard /wp-admin2,295 ▲1185.65 ▲0.0693.15 ▼8.0643.03 ▼0.06
Posts /wp-admin/edit.php2,203 ▲1062.03 ▲0.0340.91 ▲1.3436.25 ▼2.90
Add New Post /wp-admin/post-new.php1,604 ▲7523.63 ▲0.08646.07 ▼58.5357.73 ▼1.69
Media Library /wp-admin/upload.php1,501 ▲984.21 ▲0.04101.92 ▼1.5944.74 ▲1.66
Tools /wp-admin/admin.php?page=coreactivity-tools1,0822.3137.1550.39
Events /wp-admin/admin.php?page=coreactivity-events4,8492.4038.2097.23
Setup Wizard /wp-admin/admin.php?page=coreactivity-wizard1,1692.3331.5066.44
Settings /wp-admin/admin.php?page=coreactivity-settings1,3202.3633.8661.29
About /wp-admin/admin.php?page=coreactivity-about1,2152.3031.9794.30
Logs /wp-admin/admin.php?page=coreactivity-logs3,9682.2945.2063.51
Overview /wp-admin/admin.php?page=coreactivity-dashboard1,4562.2732.05100.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 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
  • Zombie tables detected upon uninstall: 3 tables
    • wp_coreactivity_logmeta
    • wp_coreactivity_logs
    • wp_coreactivity_events
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/coreactivity/vendor/ip2location/ip2location/ip2location-php/ip2location_bin_download.php
  • 36× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Model/ConnectionType.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Exception\\GeoIp2Exception' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Exception/AddressNotFoundException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Record/Subdivision.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Model/Domain.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Model\\City' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Model/Enterprise.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GeoIp2\\ProviderInterface' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/WebService/Client.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Record/Continent.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Record/Country.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Model/AnonymousIp.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/coreactivity/vendor/geoip2/geoip2/geoip2/src/Model/Country.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in coreactivity/assets to your readme.txt
The official readme.txt is a good inspiration

coreactivity/coreactivity.php 92% from 13 tests

The main PHP script in "coreActivity: Activity Logging plugin for WordPress" version 1.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected52,500 lines of code in 486 files:
LanguageFilesBlank linesComment linesLines of code
PHP3077,4045,76130,881
CSS411,2253911,292
Sass54898265,214
JavaScript703391083,413
Markdown1252401,599
JSON200101

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.37
▷ Minimum class complexity1.00
▷ Maximum class complexity198.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces54
Interfaces1
Traits3
Classes222
▷ Abstract classes4821.62%
▷ Concrete classes17478.38%
▷ Final classes21.15%
Methods2,011
▷ Static methods25712.78%
▷ Public methods1,41770.46%
▷ Protected methods41220.49%
▷ Private methods1829.05%
Functions26
▷ Named functions2180.77%
▷ Anonymous functions519.23%
Constants147
▷ Global constants117.48%
▷ Class constants13692.52%
▷ Public constants12088.24%

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
3 compressed PNG files occupy 0.06MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
d4plib/resources/vendor/flags/img/flags_responsive.png54.14KB57.01KB0.00%
d4plib/resources/gfx/buy_me_a_coffee.png7.73KB7.79KB0.00%
d4plib/resources/vendor/flags/img/flag_placeholder.png0.09KB0.09KB0.00%