72% newscodes-news-magazine-and-blog-elements

Code Review | Newscodes - News, Magazine and Blog Elements - Free Version

WordPress plugin Newscodes - News, Magazine and Blog Elements - Free Version scored72%from 54 tests.

About plugin

  • Plugin page: newscodes-news-ma...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Feb 28, 2016
  • Latest release: Nov 8, 2016
  • Number of updates: 7
  • Update frequency: every 36.4 days
  • Top authors: dzeriho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /6,840 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
Install script ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼16.80ms] Passed 4 tests

Server-side resources used by Newscodes - News, Magazine and Blog Elements - Free Version
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2944.60 ▼1.26
Dashboard /wp-admin3.88 ▲0.5835.35 ▼22.22
Posts /wp-admin/edit.php3.95 ▲0.5938.68 ▼18.18
Add New Post /wp-admin/post-new.php6.14 ▲0.2676.93 ▼25.55
Media Library /wp-admin/upload.php3.88 ▲0.6537.07 ▲1.66
Newscodes /wp-admin/options-general.php?page=newscodes_settings3.8732.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 336 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Newscodes - News, Magazine and Blog Elements - Free Version
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.49 ▼1.059.15 ▲7.4644.28 ▲2.80
Dashboard /wp-admin2,203 ▲235.49 ▼0.1782.28 ▼4.6741.75 ▲1.66
Posts /wp-admin/edit.php2,108 ▲51.97 ▼0.0636.76 ▼3.7632.62 ▼3.63
Add New Post /wp-admin/post-new.php1,532 ▲323.04 ▲0.10758.42 ▲114.7754.45 ▲1.71
Media Library /wp-admin/upload.php1,411 ▲84.22 ▲0.00101.40 ▲1.1242.15 ▼8.79
Newscodes /wp-admin/options-general.php?page=newscodes_settings1,2962.7941.6732.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=newscodes_settings
    • > Deprecated in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/nc-admin.php+2318
    Non-static method NewsCodes::plugin_url() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=newscodes_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=newscodes_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/newscodes-news-magazine-and-blog-elements/templates/loop-end.php
    • > /wp-content/plugins/newscodes-news-magazine-and-blog-elements/templates/loop-start.php
  • 63× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Exception_Parser' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Exception/Compiler.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Tree/Condition.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Tree/Alpha.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Tree/Call.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Visitor' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Visitor/joinSelector.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Tree/Operation.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Visitor' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/VisitorReplacing.php:9
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Exception/Chunk.php on line 99
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Exception/Chunk.php on line 89
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Exception_Parser' not found in wp-content/plugins/newscodes-news-magazine-and-blog-elements/includes/less/lib/Less/Exception/Chunk.php:9

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
Please take inspiration from this readme.txt

newscodes-news-magazine-and-blog-elements/newscodes.php 85% from 13 tests

The primary PHP file in "Newscodes - News, Magazine and Blog Elements - Free Version" version 2.0.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("newscodes-news-magazine-and-blog-elements.php" instead of "newscodes.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected118,718 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
SVG5220101,613
PHP843,6942,21413,247
CSS92711422,057
JavaScript4365101,032
LESS1111465769

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity28.14
▷ Minimum class complexity1.00
▷ Maximum class complexity391.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes74
▷ Abstract classes11.35%
▷ Concrete classes7398.65%
▷ Final classes11.37%
Methods669
▷ Static methods11717.49%
▷ Public methods55282.51%
▷ Protected methods202.99%
▷ Private methods9714.50%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/images/vc-icon.png5.55KB2.99KB▼ 46.03%