61% cod-network

Code Review | COD Network

WordPress plugin COD Network scored61%from 54 tests.

About plugin

  • Plugin page: cod-network
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Jun 27, 2022
  • Latest release: Jun 27, 2022
  • Number of updates: 4
  • Update frequency: every 8.8 days
  • Top authors: codnetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,691 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.47MB] [CPU: ▼18.08ms] Passed 4 tests

Analyzing server-side resources used by COD Network
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.06 ▼3.29
Dashboard /wp-admin3.56 ▲0.2554.49 ▲3.93
Posts /wp-admin/edit.php3.61 ▲0.2548.39 ▼4.43
Add New Post /wp-admin/post-new.php3.42 ▼2.4739.19 ▼66.56
Media Library /wp-admin/upload.php3.42 ▲0.1939.96 ▲1.96
Cod.network /wp-admin/admin.php?page=cod.network3.3837.19
Activity Logs /wp-admin/admin.php?page=codNetwork-status3.5038.35
Settings /wp-admin/admin.php?page=codn-settings3.4534.69

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 273 new files
Database: 3 new tables, 7 new options
New tables
wp_codnetwork_queue_failures
wp_codnetwork_queue_jobs
wp_codnetwork_setting
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by COD Network
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲11314.67 ▲0.571.75 ▼0.1141.01 ▼2.02
Dashboard /wp-admin2,275 ▲985.57 ▼0.0691.67 ▼1.31104.05 ▲59.87
Posts /wp-admin/edit.php2,195 ▲952.13 ▲0.1439.12 ▲0.9438.99 ▲2.87
Add New Post /wp-admin/post-new.php45 ▼1,4840.42 ▼22.420.12 ▼676.179.58 ▼54.43
Media Library /wp-admin/upload.php1,489 ▲894.17 ▼0.0297.55 ▼15.5782.25 ▲31.84
Cod.network /wp-admin/admin.php?page=cod.network9312.3129.7951.23
Activity Logs /wp-admin/admin.php?page=codNetwork-status9792.0029.5475.31
Settings /wp-admin/admin.php?page=codn-settings9091.8832.6339.57

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=codNetwork-status
    • > Warning in wp-content/plugins/cod-network/Services/CODN_Cookie_Service.php+24
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cod-network/vendor/symfony/translation/Resources/bin/translation-status.php
  • 79× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' not found in wp-content/plugins/cod-network/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php:23
    • > PHP Notice
      Undefined index: argv in wp-content/plugins/cod-network/vendor/symfony/translation/Resources/bin/translation-status.php on line 52
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Queue\\Connections\\DatabaseConnection' not found in wp-content/plugins/cod-network/Repositories/CODN_Custom_Queue_Connection.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/cod-network/vendor/symfony/translation/Loader/JsonFileLoader.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' not found in wp-content/plugins/cod-network/vendor/symfony/translation/Writer/TranslationWriter.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Extractor\\ExtractorInterface' not found in wp-content/plugins/cod-network/vendor/symfony/translation/Extractor/ChainExtractor.php:21
    • > PHP Notice
      Undefined variable: codNetwork in wp-content/plugins/cod-network/admin/view/settings.php on line 33
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/cod-network/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/cod-network/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function network_admin_url() in wp-content/plugins/cod-network/admin/view/notice.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2 in cod-network/assets to your readme.txt
You can look at the official readme.txt

cod-network/cod.network.php 77% from 13 tests

The main PHP file in "COD Network" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cod-network.php" instead of "cod.network.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 154 characters long)

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/cod-network/vendor/nesbot/carbon/bin/upgrade-carbon.bat
21,172 lines of code in 261 files:
LanguageFilesBlank linesComment linesLines of code
PHP2293,3447,92016,806
XSD392482,803
JSON1000984
Markdown111380402
CSS2166113
SVG10025
YAML24018
XML10016
DOS Batch1004
JavaScript1061

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 160)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity14.83
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity160.00
Code structure
Namespaces32
Interfaces21
Traits1
Classes115
▷ Abstract classes54.35%
▷ Concrete classes11095.65%
▷ Final classes43.64%
Methods1,061
▷ Static methods20619.42%
▷ Public methods90485.20%
▷ Protected methods888.29%
▷ Private methods696.50%
Functions148
▷ Named functions11879.73%
▷ Anonymous functions3020.27%
Constants93
▷ Global constants1212.90%
▷ Class constants8187.10%
▷ Public constants7896.30%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin