84% directoryengines-counter

Code Review | DirectoryEngine Counter

WordPress plugin DirectoryEngine Counter scored84%from 54 tests.

About plugin

  • Plugin page: directoryengines-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2015
  • Latest release: Jan 15, 2015
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: nguyenvanduocit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼1.82ms] Passed 4 tests

Server-side resources used by DirectoryEngine Counter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3940.48 ▼4.85
Dashboard /wp-admin3.69 ▲0.3951.83 ▼2.64
Posts /wp-admin/edit.php3.74 ▲0.3851.45 ▲1.72
Add New Post /wp-admin/post-new.php6.28 ▲0.3899.57 ▼1.49
Media Library /wp-admin/upload.php3.62 ▲0.3838.38 ▲4.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: 1 new table, 6 new options
New tables
wp_de_counter
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

DirectoryEngine Counter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.181.86 ▼0.0440.62 ▼7.18
Dashboard /wp-admin2,198 ▲335.63 ▼0.0891.77 ▼0.1538.61 ▼8.31
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0940.69 ▲5.0133.00 ▼8.94
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.42665.68 ▲5.4838.49 ▼20.84
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.07109.45 ▲3.1145.25 ▼0.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/directoryengines-counter/framework/Widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/directoryengines-counter/plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/directoryengines-counter/framework/BoxesPage.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (diadiemphatgiao.vn) image required
You can take inspiration from this readme.txt

directoryengines-counter/plugin.php 92% from 13 tests

The main PHP file in "DirectoryEngine Counter" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("directoryengines-counter.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,831 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP165871,4701,809
JSON10022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.08
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes626.09%
▷ Concrete classes1773.91%
▷ Final classes00.00%
Methods187
▷ Static methods5730.48%
▷ Public methods13873.80%
▷ Protected methods3820.32%
▷ Private methods115.88%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
PNG images were not found in this plugin