84% newor-media

Code Review | Newor Media

WordPress plugin Newor Media scored84%from 54 tests.

About plugin

  • Plugin page: newor-media
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2023
  • Latest release: Jun 22, 2023
  • Number of updates: 15
  • Update frequency: every 4.3 days
  • Top authors: newormedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼1.75ms] Passed 4 tests

An overview of server-side resources used by Newor Media
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3845.00 ▲2.77
Dashboard /wp-admin3.68 ▲0.3844.89 ▼5.29
Posts /wp-admin/edit.php3.73 ▲0.3748.06 ▲4.85
Add New Post /wp-admin/post-new.php6.22 ▲0.3384.49 ▼5.96
Media Library /wp-admin/upload.php3.60 ▲0.3733.13 ▲1.47

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 134 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Newor Media
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.74 ▼0.841.64 ▼0.3742.76 ▼1.67
Dashboard /wp-admin2,221 ▲305.84 ▲0.97102.91 ▼14.5484.29 ▲40.04
Posts /wp-admin/edit.php2,104 ▲122.10 ▲0.0935.56 ▼16.5233.67 ▼13.92
Add New Post /wp-admin/post-new.php1,533 ▲1922.96 ▲5.52727.48 ▲68.7351.33 ▼7.59
Media Library /wp-admin/upload.php1,403 ▲184.22 ▼0.0397.40 ▼1.7648.84 ▲6.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 51× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/newor-media/vendor/symfony/css-selector/Parser/Handler/IdentifierHandler.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/newor-media/vendor/symfony/css-selector/Node/FunctionNode.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/newor-media/vendor/symfony/css-selector/Parser/Handler/StringHandler.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/newor-media/admin/partials/newor-media-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'voku\\helper\\AbstractSimpleXmlDom' not found in wp-content/plugins/newor-media/vendor/voku/simple_html_dom/src/voku/helper/SimpleXmlDom.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/newor-media/vendor/symfony/css-selector/Parser/Shortcut/ElementParser.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/newor-media/vendor/symfony/polyfill-php80/PhpToken.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/newor-media/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/newor-media/admin/templates/ad-unit-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/newor-media/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: advertising, newormedia, header bidding

newor-media/newor-media.php 92% from 13 tests

Analyzing the main PHP file in "Newor Media" version 1.0.4
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin8,561 lines of code in 121 files:
LanguageFilesBlank linesComment linesLines of code
PHP1031,9145,6997,110
Markdown83421754
JSON600376
CSS1380180
YAML214088
JavaScript18153

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.21
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces13
Interfaces13
Traits0
Classes76
▷ Abstract classes79.21%
▷ Concrete classes6990.79%
▷ Final classes34.35%
Methods801
▷ Static methods425.24%
▷ Public methods75293.88%
▷ Protected methods303.75%
▷ Private methods192.37%
Functions26
▷ Named functions1246.15%
▷ Anonymous functions1453.85%
Constants25
▷ Global constants416.00%
▷ Class constants2184.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/nm-icon.png2.73KB1.86KB▼ 31.95%
images/nm-logo.png5.17KB3.22KB▼ 37.74%